Set numCtx = 32768 for Ollama models

This commit is contained in:
Patryk Wegrzyn 2024-11-07 23:51:12 +00:00 committed by GitHub
parent 775283e3b4
commit dec65132e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,10 @@ export function getGroqModel(apiKey: string, model: string) {
}
export function getOllamaModel(baseURL: string, model: string) {
let Ollama = ollama(model);
let Ollama = ollama(model, {
numCtx: 32768,
});
Ollama.config.baseURL = `${baseURL}/api`;
return Ollama;
}