chatStream 默认 keep_alive=1h,防止模型在 Agent Loop 多轮调用后被 Ollama 服务端卸载

This commit is contained in:
thzxx
2026-06-05 10:04:02 +08:00
parent 34aa16fa3e
commit 9a101b8a44
+1
View File
@@ -73,6 +73,7 @@ export class OllamaAPI {
model: params.model, model: params.model,
messages: params.messages, messages: params.messages,
stream: true, stream: true,
keep_alive: '1h',
}; };
if (params.think !== undefined) body.think = params.think; if (params.think !== undefined) body.think = params.think;
if (params.system) body.system = params.system; if (params.system) body.system = params.system;