mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-17 21:25:46 +02:00
ruff
This commit is contained in:
@@ -1195,6 +1195,7 @@
|
||||
"from langgraph.graph import StateGraph, START, END\n",
|
||||
"from langgraph.graph.message import add_messages\n",
|
||||
"from langgraph.prebuilt import ToolNode\n",
|
||||
"\n",
|
||||
"# highlight-next-line\n",
|
||||
"from langgraph.types import Command, interrupt\n",
|
||||
"\n",
|
||||
@@ -1690,7 +1691,7 @@
|
||||
"source": [
|
||||
"human_command = Command(resume={\"action\": \"continue\"})\n",
|
||||
"\n",
|
||||
"events = graph.stream(human_command, config,stream_mode=\"values\")\n",
|
||||
"events = graph.stream(human_command, config, stream_mode=\"values\")\n",
|
||||
"for event in events:\n",
|
||||
" if \"messages\" in event:\n",
|
||||
" event[\"messages\"][-1].pretty_print()"
|
||||
@@ -2572,7 +2573,7 @@
|
||||
"def human_review_node(state: State) -> Command[Literal[\"chatbot\", \"tools\"]]:\n",
|
||||
" last_message = state[\"messages\"][-1]\n",
|
||||
" tool_call = last_message.tool_calls[-1]\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" # highlight-next-line\n",
|
||||
" if not tool_call[\"name\"] == RequestAssistance.__name__:\n",
|
||||
" return Command(goto=\"tools\")\n",
|
||||
|
||||
Reference in New Issue
Block a user