mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-04 15:45:19 +02:00
ollama no embedding by default
This commit is contained in:
parent
ea4922e8f0
commit
c8b6504221
2 changed files with 6 additions and 3 deletions
|
@ -51,8 +51,12 @@ export class Prompter {
|
|||
throw new Error('Unknown API:', api);
|
||||
|
||||
let embedding = this.prompts.embedding;
|
||||
if (embedding === undefined)
|
||||
embedding = {api: chat.api};
|
||||
if (embedding === undefined) {
|
||||
if (chat.api !== 'ollama')
|
||||
embedding = {api: chat.api};
|
||||
else
|
||||
embedding = {api: 'none'};
|
||||
}
|
||||
else if (typeof embedding === 'string' || embedding instanceof String)
|
||||
embedding = {api: embedding};
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ export class Local {
|
|||
let res = null;
|
||||
try {
|
||||
console.log(`Awaiting local response... (model: ${model})`)
|
||||
console.log('Messages:', messages);
|
||||
res = await this.send(this.chat_endpoint, {model: model, messages: messages, stream: false});
|
||||
if (res)
|
||||
res = res['message']['content'];
|
||||
|
|
Loading…
Add table
Reference in a new issue