JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix: 最后一帧流式输出
douran3699d0d64469
diff --git a/jiuwenclaw/agentserver/deep_agent/interface_deep.py b/jiuwenclaw/agentserver/deep_agent/interface_deep.pyindex 125422c885..00f48ae0f5 100644--- a/jiuwenclaw/agentserver/deep_agent/interface_deep.py+++ b/jiuwenclaw/agentserver/deep_agent/interface_deep.py@@ -132,7 +132,6 @@ from jiuwenclaw.utils import (load_dotenv(dotenv_path=get_env_file())_react_config = get_config().get("react", {})-_STREAM_CHAR_THRESHOLD = _react_config.get("stream_character_threshold", 2000)_CRON_TOOL_CHANNEL_ID: ContextVar[str] = ContextVar("cron_tool_channel_id",@@ -2612,16 +2611,12 @@ class JiuWenClawDeepAdapter:if isinstance(chunk.payload, dict)else str(chunk.payload))- if content:- accumulated_text += content- if len(accumulated_text) >= _STREAM_CHAR_THRESHOLD:- yield AgentResponseChunk(- request_id=rid,- channel_id=cid,- payload={"event_type": "chat.delta", "content": accumulated_text},- is_complete=False,- )- accumulated_text = ""+ yield AgentResponseChunk(+ request_id=rid,+ channel_id=cid,+ payload={"event_type": "chat.delta", "content": content},+ is_complete=False,+ )continueif chunk_type == "answer":