chatStream 默认 keep_alive=1h,防止模型在 Agent Loop 多轮调用后被 Ollama 服务端卸载
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user