allow user overriden context length for ollama provider
This commit is contained in:
parent
4c873ec095
commit
ae3325d0de
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue