feat(muti agent): non-streaming output sub-nodes do not record the generated content of the conversation
This commit is contained in:
@@ -245,7 +245,8 @@ class DraftRunService:
|
||||
storage_type: Optional[str] = None,
|
||||
user_rag_memory_id: Optional[str] = None,
|
||||
web_search: bool = True,
|
||||
memory: bool = True
|
||||
memory: bool = True,
|
||||
sub_agent: bool = False
|
||||
) -> Dict[str, Any]:
|
||||
"""执行试运行(使用 LangChain Agent)
|
||||
|
||||
@@ -435,7 +436,7 @@ class DraftRunService:
|
||||
elapsed_time = time.time() - start_time
|
||||
|
||||
# 8. 保存会话消息
|
||||
if agent_config.memory and agent_config.memory.get("enabled"):
|
||||
if not sub_agent and agent_config.memory and agent_config.memory.get("enabled"):
|
||||
await self._save_conversation_message(
|
||||
conversation_id=conversation_id,
|
||||
user_message=message,
|
||||
|
||||
@@ -1327,7 +1327,8 @@ class MultiAgentOrchestrator:
|
||||
web_search=web_search,
|
||||
memory=memory,
|
||||
storage_type=storage_type,
|
||||
user_rag_memory_id=user_rag_memory_id
|
||||
user_rag_memory_id=user_rag_memory_id,
|
||||
sub_agent=True
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user