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(llamacpp): include model field in embedding tokenize request

Akarshan Biswas7642b8d1ab1a
diff --git a/extensions/llamacpp-extension/src/index.ts b/extensions/llamacpp-extension/src/index.ts
index 7e7d21227..731fd7040 100644
--- a/extensions/llamacpp-extension/src/index.ts
+++ b/extensions/llamacpp-extension/src/index.ts
@@ -3507,7 +3507,7 @@ export default class llamacpp_extension extends AIEngine {
'Content-Type': 'application/json',
'Authorization': `Bearer ${sInfo.api_key}`,
},
- body: JSON.stringify({ content: text }),
+ body: JSON.stringify({ content: text, model: sInfo.model_id }),
})
if (!res.ok) {
throw new Error(`Tokenize request failed with status ${res.status}`)