Skip to content

Commit 6b61e47

Browse files
committed
wip
1 parent 6e923b1 commit 6b61e47

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

template_langgraph/services/streamlits/pages/chat_with_tools_agent.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@
2121
AgentState,
2222
ChatWithToolsAgent,
2323
)
24+
from template_langgraph.loggers import get_logger
2425
from template_langgraph.speeches.stt import SttWrapper
2526
from template_langgraph.speeches.tts import TtsWrapper
2627
from template_langgraph.tools.common import get_default_tools
2728

29+
logger = get_logger(__name__)
30+
logger.setLevel("DEBUG")
31+
2832

2933
class CheckpointType(str, Enum):
3034
SQLITE = "sqlite"
@@ -126,6 +130,14 @@ def get_checkpointer():
126130
def 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,

0 commit comments

Comments
 (0)