albertCHY commited on
Commit
e131ce6
·
verified ·
1 Parent(s): 01dbc28

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +3 -9
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("~" * 50)
196
  print(response.content[0].get("thinking"))
197
- print("~" * 50)
198
- for message in response["messages"]:
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"],