* Add js function to generate gpu and cuda detection * inference nitro manage via json file instead of bash and bat script * Add /usr/lib/x86_64-linux-gnu/ to linux check gpu * chore: add CPU - GPU toggle * correct file path * fix: exist file sync check * fix: get resources path * Fix error jan/engines create existed error * Seting sync to file * Fix error show notification for GPU * Set notify default to true --------- Co-authored-by: Hien To <tominhhien97@gmail.com> Co-authored-by: Louis <louis@jan.ai>
11 lines
332 B
TypeScript
11 lines
332 B
TypeScript
import { Model } from '@janhq/core'
|
|
|
|
export const modelBinFileName = (model: Model) => {
|
|
const modelFormatExt = '.gguf'
|
|
const extractedFileName = model.source_url?.split('/').pop() ?? model.id
|
|
const fileName = extractedFileName.toLowerCase().endsWith(modelFormatExt)
|
|
? extractedFileName
|
|
: model.id
|
|
return fileName
|
|
}
|