Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: set default memory mode and clean up unused import (#6463)

Akarshan Biswas9e3a77a5597e
diff --git a/extensions/llamacpp-extension/src/index.ts b/extensions/llamacpp-extension/src/index.ts
index efccca679..2d5d9272b 100644
--- a/extensions/llamacpp-extension/src/index.ts
+++ b/extensions/llamacpp-extension/src/index.ts
@@ -37,7 +37,6 @@ import { invoke } from '@tauri-apps/api/core'
import { getProxyConfig } from './util'
import { basename } from '@tauri-apps/api/path'
import {
- GgufMetadata,
readGgufMetadata,
} from '@janhq/tauri-plugin-llamacpp-api'
import { getSystemUsage, getSystemInfo } from '@janhq/tauri-plugin-hardware-api'
@@ -178,7 +177,7 @@ export default class llamacpp_extension extends AIEngine {
provider: string = 'llamacpp'
autoUnload: boolean = true
llamacpp_env: string = ''
- memoryMode: string = 'high'
+ memoryMode: string = ''
readonly providerId: string = 'llamacpp'
private config: LlamacppConfig
@@ -210,7 +209,7 @@ export default class llamacpp_extension extends AIEngine {
this.autoUnload = this.config.auto_unload
this.llamacpp_env = this.config.llamacpp_env
- this.memoryMode = this.config.memory_util
+ this.memoryMode = this.config.memory_util || 'high'
// This sets the base directory where model files for this provider are stored.
this.providerPath = await joinPath([