Update agent.py
Browse files
agent.py
CHANGED
|
@@ -192,16 +192,10 @@ model_with_tools = model.bind_tools(tools)
|
|
| 192 |
|
| 193 |
def assistant(state: AgentState):
|
| 194 |
response = model_with_tools.invoke(state["messages"])
|
| 195 |
-
print("
|
| 196 |
print(response.content[0].get("thinking"))
|
| 197 |
-
print("
|
| 198 |
-
|
| 199 |
-
if hasattr(message, "tool_calls") and message.tool_calls:
|
| 200 |
-
print("--- Agent tool call ---")
|
| 201 |
-
print(message.tool_calls)
|
| 202 |
-
if message.type == "tool":
|
| 203 |
-
print(f"--- tool response ({message.name}) ---")
|
| 204 |
-
print(message.content[:200])
|
| 205 |
return {
|
| 206 |
"messages": [response],
|
| 207 |
"file_path": state["file_path"],
|
|
|
|
| 192 |
|
| 193 |
def assistant(state: AgentState):
|
| 194 |
response = model_with_tools.invoke(state["messages"])
|
| 195 |
+
print("--- Thinking Section ---")
|
| 196 |
print(response.content[0].get("thinking"))
|
| 197 |
+
print("--- End of Thinking ---")
|
| 198 |
+
print(response)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
return {
|
| 200 |
"messages": [response],
|
| 201 |
"file_path": state["file_path"],
|