From 67d48ea6006dc6eb64694b5673f4737a569ef55f Mon Sep 17 00:00:00 2001 From: standby24x7 Date: Sat, 9 Mar 2024 02:35:36 +0900 Subject: [PATCH] docs:Update function "run" to "invoke" in llm_bash.ipynb (#18663) This path updates function "run" to "invoke" in llm_bash.ipynb. Without this path, you see following warning. LangChainDeprecationWarning: The function `run` was deprecated in LangChain 0.1.0 and will be removed in 0.2.0. Use invoke instead. Signed-off-by: Masanari Iida --- cookbook/llm_bash.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbook/llm_bash.ipynb b/cookbook/llm_bash.ipynb index 61a56f1783..d7ff0c51cb 100644 --- a/cookbook/llm_bash.ipynb +++ b/cookbook/llm_bash.ipynb @@ -52,7 +52,7 @@ "\n", "bash_chain = LLMBashChain.from_llm(llm, verbose=True)\n", "\n", - "bash_chain.run(text)" + "bash_chain.invoke(text)" ] }, { @@ -135,7 +135,7 @@ "\n", "text = \"Please write a bash script that prints 'Hello World' to the console.\"\n", "\n", - "bash_chain.run(text)" + "bash_chain.invoke(text)" ] }, { @@ -190,7 +190,7 @@ "\n", "text = \"List the current directory then move up a level.\"\n", "\n", - "bash_chain.run(text)" + "bash_chain.invoke(text)" ] }, { @@ -231,7 +231,7 @@ ], "source": [ "# Run the same command again and see that the state is maintained between calls\n", - "bash_chain.run(text)" + "bash_chain.invoke(text)" ] } ],