Skip to content

Commit 84f2d07

Browse files
committed
Provide a stdin answer for the prompt. Prompting for user input from a bash shell works in Colab, but not inside jupyter https://papermill.readthedocs.io/en/latest/usage-workflow.html
Signed-off-by: David Gardner <[email protected]>
1 parent f51aac5 commit 84f2d07

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/notebooks/4_multi_agent_orchestration.ipynb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1843,13 +1843,20 @@
18431843
"## 3.5) Running the Workflow"
18441844
]
18451845
},
1846+
{
1847+
"cell_type": "markdown",
1848+
"metadata": {},
1849+
"source": [
1850+
"The HITL tool will prompt the user for input when it is called. This works when running in an internactive terminal, but in a notebook environment like this one, the prompt may not function as expected, so we will simulate user input by echoing \"yes\" into the command. This can be replaced with \"no\" to simulate a negative response, or run directly in a terminal for interactive input."
1851+
]
1852+
},
18461853
{
18471854
"cell_type": "code",
18481855
"execution_count": null,
18491856
"metadata": {},
18501857
"outputs": [],
18511858
"source": [
1852-
"!nat run --config_file retail_sales_agent/configs/config_multi_agent_hitl.yml \\\n",
1859+
"! echo \"yes\" | nat run --config_file retail_sales_agent/configs/config_multi_agent_hitl.yml \\\n",
18531860
" --input \"Plot average daily revenue\""
18541861
]
18551862
},

0 commit comments

Comments
 (0)