allow user overriden context length for ollama provider

This commit is contained in:
Nate Sesti 2024-08-13 17:19:27 -07:00
parent 4c873ec095
commit ae3325d0de

View file

@ -50,7 +50,8 @@ class Ollama extends BaseLLM {
let value = parts[2];
switch (key) {
case "num_ctx":
this.contextLength = Number.parseInt(value);
this.contextLength =
options.contextLength ?? Number.parseInt(value);
break;
case "stop":
if (!this.completionOptions.stop) {