From fa0c9390c2684029a9280dd31955e41006cd2616 Mon Sep 17 00:00:00 2001 From: wangml999 <35835989+wangml999@users.noreply.github.com> Date: Thu, 13 Apr 2023 02:13:46 +1000 Subject: [PATCH] Update custom_agent.ipynb (#2767) Fixed an issue the agent is not taking the user's question as input. --- docs/modules/agents/agents/custom_agent.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/agents/agents/custom_agent.ipynb b/docs/modules/agents/agents/custom_agent.ipynb index 08a7bbb8..34a5aa59 100644 --- a/docs/modules/agents/agents/custom_agent.ipynb +++ b/docs/modules/agents/agents/custom_agent.ipynb @@ -77,7 +77,7 @@ " Returns:\n", " Action specifying what tool to use.\n", " \"\"\"\n", - " return AgentAction(tool=\"Search\", tool_input=\"foo\", log=\"\")\n", + " return AgentAction(tool=\"Search\", tool_input=kwargs[\"input\"], log=\"\")\n", "\n", " async def aplan(\n", " self, intermediate_steps: List[Tuple[AgentAction, str]], **kwargs: Any\n", @@ -92,7 +92,7 @@ " Returns:\n", " Action specifying what tool to use.\n", " \"\"\"\n", - " return AgentAction(tool=\"Search\", tool_input=\"foo\", log=\"\")" + " return AgentAction(tool=\"Search\", tool_input=kwargs[\"input\"], log=\"\")" ] }, {