🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
feat: Update message append logic for `handle_stream_response` (#916)
Wendong-Fan38ffe735dcb8
diff --git a/camel/agents/chat_agent.py b/camel/agents/chat_agent.pyindex 6fdd1c912..9c1bf181f 100644--- a/camel/agents/chat_agent.py+++ b/camel/agents/chat_agent.py@@ -815,7 +815,7 @@ class ChatAgent(BaseAgent):# When response has not been stopped# Notice that only the first chunk_dict has the "role"content_dict[index] += delta.content- else:+ elif choice.finish_reason:finish_reasons_dict[index] = choice.finish_reasonchat_message = BaseMessage(role_name=self.role_name,