ameglei-external commited on
Commit
0892edd
·
verified ·
1 Parent(s): b73d766

Add pprint logs, not the usual print

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  from typing import TypedDict, List, Dict, Any, Optional, Tuple
3
  from typing_extensions import Annotated
4
 
@@ -110,7 +111,8 @@ class BasicAgent:
110
  return final_answer, result["messages"]
111
 
112
  def assistant(self, state: State):
113
- print("\nAssistant invoked. State:", state)
 
114
  response = self.model_with_tools.invoke(state["messages"])
115
  print("\nAssistant response:", response)
116
  return {
 
1
  import os
2
+ from pprint import pprint
3
  from typing import TypedDict, List, Dict, Any, Optional, Tuple
4
  from typing_extensions import Annotated
5
 
 
111
  return final_answer, result["messages"]
112
 
113
  def assistant(self, state: State):
114
+ print("\nAssistant invoked. State:\n")
115
+ pprint(state)
116
  response = self.model_with_tools.invoke(state["messages"])
117
  print("\nAssistant response:", response)
118
  return {