Convert multiple tool calls into a message format suitable for API calls.
PARAMETER | DESCRIPTION |
*tool_calls | One or more ToolCall objects to convert. TYPE: ToolCall DEFAULT: () |
Source code in autogen/testing/messages.py
| def tools_message(*tool_calls: ToolCall) -> dict[str, Any]:
"""Convert multiple tool calls into a message format suitable for API calls.
Args:
*tool_calls: One or more ToolCall objects to convert.
"""
return {"content": None, "tool_calls": [c.tool_message for c in tool_calls]}
|