Stop overriding Ollama context size
This commit is contained in:
@@ -38,6 +38,7 @@ https://lab.k1412.top/
|
|||||||
- Search Agent 查询理解:`ChatGPT-5.6:light`
|
- Search Agent 查询理解:`ChatGPT-5.6:light`
|
||||||
- Search Agent 结果简报、搜索追问、论文对话:`ChatGPT-5.6:fast`
|
- Search Agent 结果简报、搜索追问、论文对话:`ChatGPT-5.6:fast`
|
||||||
- Ollama 请求单并发执行,并缓存结果到 `web/cache/ai/`
|
- Ollama 请求单并发执行,并缓存结果到 `web/cache/ai/`
|
||||||
|
- 应用侧不下发 `num_ctx`,上下文长度由 Ollama 服务端 runner 统一控制
|
||||||
- arXiv 摘要缓存到 `web/cache/arxiv/`
|
- arXiv 摘要缓存到 `web/cache/arxiv/`
|
||||||
|
|
||||||
## Knowledge Design
|
## Knowledge Design
|
||||||
|
|||||||
+5
-6
@@ -1219,19 +1219,18 @@ def clean_model_response(value: str) -> str:
|
|||||||
def call_ollama(model: str, prompt: str, mode: str) -> dict[str, Any]:
|
def call_ollama(model: str, prompt: str, mode: str) -> dict[str, Any]:
|
||||||
options = {
|
options = {
|
||||||
"temperature": 0.2,
|
"temperature": 0.2,
|
||||||
"num_ctx": 4096,
|
|
||||||
"num_predict": 520,
|
"num_predict": 520,
|
||||||
}
|
}
|
||||||
if mode == "translate":
|
if mode == "translate":
|
||||||
options.update({"num_ctx": 3072, "num_predict": 700, "temperature": 0.1})
|
options.update({"num_predict": 700, "temperature": 0.1})
|
||||||
elif mode == "deep":
|
elif mode == "deep":
|
||||||
options.update({"num_ctx": 8192, "num_predict": 900, "temperature": 0.25})
|
options.update({"num_predict": 900, "temperature": 0.25})
|
||||||
elif mode in {"atlas", "topic", "path", "compare"}:
|
elif mode in {"atlas", "topic", "path", "compare"}:
|
||||||
options.update({"num_ctx": 8192, "num_predict": 950, "temperature": 0.22})
|
options.update({"num_predict": 950, "temperature": 0.22})
|
||||||
elif mode == "search_plan":
|
elif mode == "search_plan":
|
||||||
options.update({"num_ctx": 4096, "num_predict": 420, "temperature": 0.1})
|
options.update({"num_predict": 420, "temperature": 0.1})
|
||||||
elif mode in {"search_summary", "search_followup", "paper_chat"}:
|
elif mode in {"search_summary", "search_followup", "paper_chat"}:
|
||||||
options.update({"num_ctx": 8192, "num_predict": 780, "temperature": 0.18})
|
options.update({"num_predict": 780, "temperature": 0.18})
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
"model": model,
|
"model": model,
|
||||||
|
|||||||
Reference in New Issue
Block a user