Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions module-2/chatbot-summarization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
" \n",
" # If there are more than six messages, then we summarize the conversation\n",
" if len(messages) > 6:\n",
" return \"summarize_conversation\"\n",
" return \"summarize\"\n",
" \n",
" # Otherwise we can just end\n",
" return END"
Expand Down Expand Up @@ -274,12 +274,12 @@
"# Define a new graph\n",
"workflow = StateGraph(State)\n",
"workflow.add_node(\"conversation\", call_model)\n",
"workflow.add_node(summarize_conversation)\n",
"workflow.add_node(\"summarize\",summarize_conversation)\n",
"\n",
"# Set the entrypoint as conversation\n",
"workflow.add_edge(START, \"conversation\")\n",
"workflow.add_conditional_edges(\"conversation\", should_continue)\n",
"workflow.add_edge(\"summarize_conversation\", END)\n",
"workflow.add_edge(\"summarize\", END)\n",
"\n",
"# Compile\n",
"memory = MemorySaver()\n",
Expand Down Expand Up @@ -363,7 +363,7 @@
"```\n",
" # If there are more than six messages, then we summarize the conversation\n",
" if len(messages) > 6:\n",
" return \"summarize_conversation\"\n",
" return \"summarize\"\n",
"```\n",
"\n",
"We can pick up the conversation because we have the thread."
Expand Down