diff --git a/docs/docs/cloud/how-tos/human_in_the_loop_user_input.md b/docs/docs/cloud/how-tos/human_in_the_loop_user_input.md index e083394e7..78c01f8bf 100644 --- a/docs/docs/cloud/how-tos/human_in_the_loop_user_input.md +++ b/docs/docs/cloud/how-tos/human_in_the_loop_user_input.md @@ -63,7 +63,7 @@ Now, let's invoke our graph by interrupting before `ask_human` node: "messages": [ { "role": "user", - "content": "Use the search tool to ask the user where they are, then look up the weather there", + "content": "Ask the user where they are, then look up the weather there", } ] } @@ -85,8 +85,7 @@ Now, let's invoke our graph by interrupting before `ask_human` node: messages: [ { role: "human", - content: "Use the search tool to ask the user where they are, then look up the weather there" - } + content: "Ask the user where they are, then look up the weather there" } ] }; @@ -115,7 +114,7 @@ Now, let's invoke our graph by interrupting before `ask_human` node: --header 'Content-Type: application/json' \ --data "{ \"assistant_id\": \"agent\", - \"input\": {\"messages\": [{\"role\": \"human\", \"content\": \"Use the search tool to ask the user where they are, then look up the weather there\"}]}, + \"input\": {\"messages\": [{\"role\": \"human\", \"content\": \"Ask the user where they are, then look up the weather there\"}]}, \"interrupt_before\": [\"ask_human\"], \"stream_mode\": [ \"updates\" diff --git a/docs/docs/how-tos/human_in_the_loop/wait-user-input.ipynb b/docs/docs/how-tos/human_in_the_loop/wait-user-input.ipynb index 8ddc73678..6ffca2b6b 100644 --- a/docs/docs/how-tos/human_in_the_loop/wait-user-input.ipynb +++ b/docs/docs/how-tos/human_in_the_loop/wait-user-input.ipynb @@ -397,7 +397,8 @@ "# We define a fake node to ask the human\n", "def ask_human(state):\n", " tool_call_id = state[\"messages\"][-1].tool_calls[0][\"id\"]\n", - " location = interrupt(\"Please provide your location:\")\n", + " ask = AskHuman.model_validate(state[\"messages\"][-1].tool_calls[0][\"args\"])\n", + " location = interrupt(ask.question)\n", " tool_message = [{\"tool_call_id\": tool_call_id, \"type\": \"tool\", \"content\": location}]\n", " return {\"messages\": tool_message}\n", "\n", @@ -491,7 +492,7 @@ " \"messages\": [\n", " (\n", " \"user\",\n", - " \"Use the search tool to ask the user where they are, then look up the weather there\",\n", + " \"Ask the user where they are, then look up the weather there\",\n", " )\n", " ]\n", " },\n",