Update agent.py
Browse files
agent.py
CHANGED
|
@@ -195,9 +195,9 @@ def assistant(state: AgentState):
|
|
| 195 |
for message in response["messages"]:
|
| 196 |
if hasattr(message, "tool_calls") and message.tool_calls:
|
| 197 |
print("--- Agent tool call ---")
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
if message.type == "tool":
|
| 202 |
print(f"--- tool response ({message.name}) ---")
|
| 203 |
print(message.content[:200])
|
|
|
|
| 195 |
for message in response["messages"]:
|
| 196 |
if hasattr(message, "tool_calls") and message.tool_calls:
|
| 197 |
print("--- Agent tool call ---")
|
| 198 |
+
for call in message.tool_calls:
|
| 199 |
+
print(f"tool name: {call['name']}")
|
| 200 |
+
print(f"parameter: {call['args']}")
|
| 201 |
if message.type == "tool":
|
| 202 |
print(f"--- tool response ({message.name}) ---")
|
| 203 |
print(message.content[:200])
|