v0.10.1: 修复显存泄漏 + 删除普通聊天模式 + Tool Calling 始终开启

fix: ollama.ts - chat() 添加默认 keep_alive: '1h',chatStream done 时不再 reader.cancel()
refactor: 删除普通聊天模式,所有消息统一走 Agent Loop
refactor: Tool Calling 开关始终开启且不可关闭
chore: 版本号 0.10.0 → 0.10.1 (12 处)
docs: 更新帮助面板和 README 反映架构变更
This commit is contained in:
thzxx
2026-06-06 12:06:48 +08:00
parent c9adc764ae
commit 64264cc0f8
13 changed files with 47 additions and 379 deletions
+2 -1
View File
@@ -56,6 +56,7 @@ export class OllamaAPI {
model: params.model,
messages: params.messages,
stream: false,
keep_alive: '1h',
};
if (params.think !== undefined) body.think = params.think;
if (params.system) body.system = params.system;
@@ -117,7 +118,7 @@ export class OllamaAPI {
const chunk: OllamaStreamChunk = JSON.parse(line);
if (onChunk) onChunk(chunk);
if (chunk.done) {
reader.cancel();
// 不调用 reader.cancel() — TCP RST 可能导致 Ollama 不执行 keep_alive
return;
}
} catch {