mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-26 01:45:25 +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);
|
throw new Error('Unknown API:', api);
|
||||||
|
|
||||||
let embedding = this.prompts.embedding;
|
let embedding = this.prompts.embedding;
|
||||||
if (embedding === undefined)
|
if (embedding === undefined) {
|
||||||
embedding = {api: chat.api};
|
if (chat.api !== 'ollama')
|
||||||
|
embedding = {api: chat.api};
|
||||||
|
else
|
||||||
|
embedding = {api: 'none'};
|
||||||
|
}
|
||||||
else if (typeof embedding === 'string' || embedding instanceof String)
|
else if (typeof embedding === 'string' || embedding instanceof String)
|
||||||
embedding = {api: embedding};
|
embedding = {api: embedding};
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ export class Local {
|
||||||
let res = null;
|
let res = null;
|
||||||
try {
|
try {
|
||||||
console.log(`Awaiting local response... (model: ${model})`)
|
console.log(`Awaiting local response... (model: ${model})`)
|
||||||
console.log('Messages:', messages);
|
|
||||||
res = await this.send(this.chat_endpoint, {model: model, messages: messages, stream: false});
|
res = await this.send(this.chat_endpoint, {model: model, messages: messages, stream: false});
|
||||||
if (res)
|
if (res)
|
||||||
res = res['message']['content'];
|
res = res['message']['content'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue