File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
template_langgraph/services/streamlits/pages Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 2121 AgentState ,
2222 ChatWithToolsAgent ,
2323)
24+ from template_langgraph .loggers import get_logger
2425from template_langgraph .speeches .stt import SttWrapper
2526from template_langgraph .speeches .tts import TtsWrapper
2627from template_langgraph .tools .common import get_default_tools
2728
29+ logger = get_logger (__name__ )
30+ logger .setLevel ("DEBUG" )
31+
2832
2933class CheckpointType (str , Enum ):
3034 SQLITE = "sqlite"
@@ -126,6 +130,14 @@ def get_checkpointer():
126130def ensure_agent_graph (selected_tools : list ) -> None :
127131 signature = (tuple (tool .name for tool in selected_tools ), get_selected_checkpoint_type ().value )
128132 graph_signature = st .session_state .get ("graph_tools_signature" )
133+ checkpointer = get_checkpointer ()
134+ if checkpointer :
135+ for checkpoint in checkpointer .list (config = None ):
136+ logger .debug (checkpoint )
137+ logger .debug (
138+ f"thread_id={ checkpoint .config ['configurable' ].get ('thread_id' )} , checkpoint={ checkpoint .checkpoint ['channel_values' ]} " , # noqa: E501
139+ )
140+
129141 if "graph" not in st .session_state or graph_signature != signature :
130142 st .session_state ["graph" ] = ChatWithToolsAgent (
131143 tools = selected_tools ,
You can’t perform that action at this time.
0 commit comments