Commit efce9518 by Michael Pastushkov

fix

parent bd29e57f
...@@ -66,12 +66,12 @@ class ConversationManager { ...@@ -66,12 +66,12 @@ class ConversationManager {
messages: messages, messages: messages,
stream: true, stream: true,
keep_alive: "5m", keep_alive: "5m",
options: { // options: { // limited results with these, and no performance gains
num_ctx: 1024, // num_ctx: 1024,
num_predict: 256, // num_predict: 256,
num_thread: 4, // num_thread: 4,
num_batch: 1024 // num_batch: 1024
} // }
}); });
// Making the main request to model // Making the main request to model
...@@ -113,6 +113,8 @@ class ConversationManager { ...@@ -113,6 +113,8 @@ class ConversationManager {
} }
} }
callback('\n');
this.history.addUser(topic, prompt); this.history.addUser(topic, prompt);
this.history.addAssistant(topic, full); this.history.addAssistant(topic, full);
} }
......
...@@ -30,13 +30,13 @@ class TopicRouter { ...@@ -30,13 +30,13 @@ class TopicRouter {
model: this.labelModel, model: this.labelModel,
messages: [{ role: 'system', content: sys }, { role: 'user', content: text }], messages: [{ role: 'system', content: sys }, { role: 'user', content: text }],
stream: false, stream: false,
options: { // options: { // limited results with these, and no performance gains
num_ctx: 1024, // num_ctx: 1024,
num_predict: 256, // num_predict: 256,
num_thread: 4, // num_thread: 4,
num_batch: 1024 // num_batch: 1024
} // }
}), })
}); });
if (!r.ok) if (!r.ok)
return null; return null;
...@@ -97,12 +97,13 @@ class TopicRouter { ...@@ -97,12 +97,13 @@ class TopicRouter {
body: JSON.stringify({ body: JSON.stringify({
model: this.embedModel, model: this.embedModel,
prompt: text , prompt: text ,
options: { // options: { // limited results with these, and no performance gains
num_ctx: 1024, // num_ctx: 1024,
num_predict: 256, // num_predict: 256,
num_thread: 4, // num_thread: 4,
num_batch: 1024 // num_batch: 1024
}}) // }
})
}); });
utils.log('Embed done', 5); utils.log('Embed done', 5);
if (!r.ok) if (!r.ok)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment