File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
implementations/python/python/ockam/agents Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -503,11 +503,13 @@ async def complete_chat(
503503 f"Sending { len (input_context )} messages from agent '{ self .name } ' to model '{ self .model .original_name } '"
504504 )
505505 response = await self .model .complete_chat (tools = self .tool_specs , messages = input_context , stream = stream )
506- messages = [choice .message for choice in response .choices ]
507- plural = "s" if len (messages ) > 1 else ""
508- self .logger .info (
509- f"Received { len (messages )} message{ plural } from model '{ self .model .original_name } ' for agent '{ self .name } '"
510- )
506+
507+ if not stream :
508+ messages = [choice .message for choice in response .choices ]
509+ plural = "s" if len (messages ) > 1 else ""
510+ self .logger .info (
511+ f"Received { len (messages )} message{ plural } from model '{ self .model .original_name } ' for agent '{ self .name } '"
512+ )
511513
512514 if stream :
513515 tool_calls : Dict [int , ToolCall ] = {}
You can’t perform that action at this time.
0 commit comments