feat: 贯通 context_window 配置并按 token 预算裁剪对话历史

This commit is contained in:
2026-09-20 14:22:53 +08:00
parent 8251a57010
commit 4114b0b4fb
21 changed files with 307 additions and 42 deletions
+2 -2
View File
@@ -89,7 +89,7 @@ class ChatStreamer(ABC):
llm: LlmRuntimeConfig,
history: list[ChatMessage],
user_text: str,
system_prompt: str,
tools: list[Any] | None = None,
memory_count: int = 0,
memory_just_saved: str | None = None,
max_tool_result_chars: int = 8000,
) -> AsyncIterator[StreamEvent]: ...