async def _add_tool_calls_message(self, calls_list, partial_text_buffer):
        """Add a message with tool calls to the conversation"""
        assistant_msg = Message(
            role="assistant",
            content=partial_text_buffer or "",
            tool_calls=[
                {
                    "id": c["tool_call_id"],
                    "type": "function",
                    "function": {
                        "name": c["name"],
                        "arguments": c["arguments"],
                    },
                }
                for c in calls_list
            ],
        )
        await self.conversation.add_message(assistant_msg)
Add a message with tool calls to the conversation
py/core/agent/base.py