From dfbf45f028bd282057c5d645c0ebb587fa91dda8 Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Wed, 17 May 2023 23:36:45 -0700 Subject: [PATCH] bump version to 173 (#4910) --- docs/index.rst | 2 +- .../examples/handle_parsing_errors.ipynb | 76 ++++++++++++++----- pyproject.toml | 2 +- 3 files changed, 61 insertions(+), 19 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 82f5c7bcdd..0c70e6821c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -184,7 +184,7 @@ Additional Resources :hidden: LangChainHub - ./additional_resources/gallery.rst + Gallery ./additional_resources/deployments.md ./additional_resources/tracing.md ./additional_resources/model_laboratory.ipynb diff --git a/docs/modules/agents/agent_executors/examples/handle_parsing_errors.ipynb b/docs/modules/agents/agent_executors/examples/handle_parsing_errors.ipynb index dd97f24d35..8cf2dd56bc 100644 --- a/docs/modules/agents/agent_executors/examples/handle_parsing_errors.ipynb +++ b/docs/modules/agents/agent_executors/examples/handle_parsing_errors.ipynb @@ -219,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "id": "5d5a3e47", "metadata": {}, "outputs": [ @@ -231,24 +231,32 @@ "\n", "\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n", "\n", - "Observation: Check your output and make sure it conforms!\n", - "Thought:\n", - "Observation: Check your output and make sure it conforms!\n", - "Thought:\u001b[32;1m\u001b[1;3mI'm sorry for the confusion. However, as the question is about a current event, I can use the Search tool to find the answer.\n", + "Observation: Could not parse LLM output: I'm sorry, but I canno\n", + "Thought:\u001b[32;1m\u001b[1;3mI need to use the Search tool to find the answer to the question.\n", "Action:\n", "```\n", "{\n", " \"action\": \"Search\",\n", - " \"action_input\": \"Leo DiCaprio girlfriend\"\n", + " \"action_input\": \"Who is Leo DiCaprio's girlfriend?\"\n", "}\n", "```\n", "\u001b[0m\n", - "Observation: \u001b[36;1m\u001b[1;3mHe went on to date Gisele Bündchen, Bar Refaeli, Blake Lively, Toni Garrn and Nina Agdal, among others, before finally settling down with current girlfriend Camila Morrone, who is 23 years his junior.\u001b[0m\n", - "Thought:\u001b[32;1m\u001b[1;3mThe answer to the question is Camila Morrone. \n", - "Final Answer: Camila Morrone.\u001b[0m\n", + "Observation: \u001b[36;1m\u001b[1;3mDiCaprio broke up with girlfriend Camila Morrone, 25, in the summer of 2022, after dating for four years. He's since been linked to another famous supermodel – Gigi Hadid. The power couple were first supposedly an item in September after being spotted getting cozy during a party at New York Fashion Week.\u001b[0m\n", + "Thought:\u001b[32;1m\u001b[1;3mThe answer to the question is that Leo DiCaprio's current girlfriend is Gigi Hadid. \n", + "Final Answer: Gigi Hadid.\u001b[0m\n", "\n", "\u001b[1m> Finished chain.\u001b[0m\n" ] + }, + { + "data": { + "text/plain": [ + "'Gigi Hadid.'" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -256,20 +264,18 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "id": "65de0bed", + "cell_type": "markdown", + "id": "c2eb06e2", "metadata": {}, - "outputs": [], "source": [ "## Custom Error Function\n", "\n", - "You can also customize the error to be a fun" + "You can also customize the error to be a function that takes the error in and outputs a string." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "22772981", "metadata": {}, "outputs": [], @@ -288,10 +294,46 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "id": "151eb820", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n", + "\n", + "Observation: Could not parse LLM output: I'm sorry, but I canno\n", + "Thought:\u001b[32;1m\u001b[1;3mI need to use the Search tool to find the answer to the question.\n", + "Action:\n", + "```\n", + "{\n", + " \"action\": \"Search\",\n", + " \"action_input\": \"Who is Leo DiCaprio's girlfriend?\"\n", + "}\n", + "```\n", + "\u001b[0m\n", + "Observation: \u001b[36;1m\u001b[1;3mDiCaprio broke up with girlfriend Camila Morrone, 25, in the summer of 2022, after dating for four years. He's since been linked to another famous supermodel – Gigi Hadid. The power couple were first supposedly an item in September after being spotted getting cozy during a party at New York Fashion Week.\u001b[0m\n", + "Thought:\u001b[32;1m\u001b[1;3mThe current girlfriend of Leonardo DiCaprio is Gigi Hadid. \n", + "Final Answer: Gigi Hadid.\u001b[0m\n", + "\n", + "\u001b[1m> Finished chain.\u001b[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "'Gigi Hadid.'" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "mrkl.run(\"Who is Leo DiCaprio's girlfriend? No need to add Action\")" ] diff --git a/pyproject.toml b/pyproject.toml index f72022fa25..7c86d733e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langchain" -version = "0.0.172" +version = "0.0.173" description = "Building applications with LLMs through composability" authors = [] license = "MIT"