Stop overriding Ollama context size
This commit is contained in:
+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]:
|
||||
options = {
|
||||
"temperature": 0.2,
|
||||
"num_ctx": 4096,
|
||||
"num_predict": 520,
|
||||
}
|
||||
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":
|
||||
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"}:
|
||||
options.update({"num_ctx": 8192, "num_predict": 950, "temperature": 0.22})
|
||||
options.update({"num_predict": 950, "temperature": 0.22})
|
||||
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"}:
|
||||
options.update({"num_ctx": 8192, "num_predict": 780, "temperature": 0.18})
|
||||
options.update({"num_predict": 780, "temperature": 0.18})
|
||||
|
||||
payload = {
|
||||
"model": model,
|
||||
|
||||
Reference in New Issue
Block a user