Fix: change ollama default num_ctx. (#6395)

### What problem does this PR solve?

#6163

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-03-21 16:22:03 +08:00
committed by GitHub
parent 85480f6292
commit a2a4bfe3e3
2 changed files with 19 additions and 14 deletions

View File

@ -441,7 +441,9 @@ class OllamaChat(Base):
if "max_tokens" in gen_conf:
del gen_conf["max_tokens"]
try:
options = {}
options = {
"num_ctx": 32768
}
if "temperature" in gen_conf:
options["temperature"] = gen_conf["temperature"]
if "max_tokens" in gen_conf: