Skip to content

Commit 3f8eab2

Browse files
authored
pass context length to ollama to avoid context truncation (#1106)
1 parent bf41953 commit 3f8eab2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

srv/adapter/payloads.ts

+1
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ function getBasePayload(opts: AdapterProps, stops: string[] = []) {
291291
mirostat: gen.mirostatToggle && gen.mirostatTau ? 2 : 0,
292292
mirostat_tau: gen.mirostatTau,
293293
mirostat_eta: gen.mirostatLR,
294+
num_ctx: gen.maxContextLength,
294295
stop: getStoppingStrings(opts, stops),
295296

296297
// ignore_eos: false,

0 commit comments

Comments
 (0)