From a2d729e5376343109d07908f90a03fa31ecfe4f5 Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Wed, 12 Apr 2023 13:44:21 -0700 Subject: [PATCH] cr --- .../agents/agents/custom_llm_agent.ipynb | 72 ++++++------------- 1 file changed, 23 insertions(+), 49 deletions(-) diff --git a/docs/modules/agents/agents/custom_llm_agent.ipynb b/docs/modules/agents/agents/custom_llm_agent.ipynb index 128f76d8..cd2092d7 100644 --- a/docs/modules/agents/agents/custom_llm_agent.ipynb +++ b/docs/modules/agents/agents/custom_llm_agent.ipynb @@ -353,7 +353,7 @@ }, { "cell_type": "markdown", - "id": "8b00f7df", + "id": "d5b4a078", "metadata": {}, "source": [ "## Adding Memory\n", @@ -367,7 +367,7 @@ { "cell_type": "code", "execution_count": 29, - "id": "c8660bbb", + "id": "94fffda1", "metadata": {}, "outputs": [], "source": [ @@ -399,7 +399,7 @@ { "cell_type": "code", "execution_count": 30, - "id": "53be0303", + "id": "f58488d7", "metadata": {}, "outputs": [], "source": [ @@ -415,7 +415,7 @@ { "cell_type": "code", "execution_count": 31, - "id": "68e4ef3e", + "id": "d28d4b5a", "metadata": {}, "outputs": [], "source": [ @@ -425,7 +425,7 @@ { "cell_type": "code", "execution_count": 32, - "id": "4ee5bb7f", + "id": "3e37b32a", "metadata": {}, "outputs": [], "source": [ @@ -441,7 +441,7 @@ { "cell_type": "code", "execution_count": 33, - "id": "6c2de0ab", + "id": "97ea1bce", "metadata": {}, "outputs": [], "source": [ @@ -450,8 +450,8 @@ }, { "cell_type": "code", - "execution_count": 34, - "id": "bdf64c39", + "execution_count": 42, + "id": "b5ad69ce", "metadata": {}, "outputs": [], "source": [ @@ -460,8 +460,8 @@ }, { "cell_type": "code", - "execution_count": 35, - "id": "e624db2a", + "execution_count": 43, + "id": "b7b5c9b1", "metadata": {}, "outputs": [], "source": [ @@ -470,8 +470,8 @@ }, { "cell_type": "code", - "execution_count": 36, - "id": "1f7fddf4", + "execution_count": 44, + "id": "5ec4c39b", "metadata": {}, "outputs": [ { @@ -497,7 +497,7 @@ "\"Arrr, there be 38,658,314 people livin' in Canada as of 2023!\"" ] }, - "execution_count": 36, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -508,8 +508,8 @@ }, { "cell_type": "code", - "execution_count": 38, - "id": "8739e591", + "execution_count": 45, + "id": "b2ba45bb", "metadata": {}, "outputs": [ { @@ -519,17 +519,12 @@ "\n", "\n", "\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n", - "\u001b[32;1m\u001b[1;3m\n", - "Thought: I need to find out how many people live in Italy.\n", + "\u001b[32;1m\u001b[1;3mThought: I need to find out how many people live in Mexico.\n", "Action: Search\n", - "Action Input: How many people live in Italy\u001b[0m\n", + "Action Input: How many people live in Mexico as of 2023?\u001b[0m\n", "\n", - "Observation:\u001b[36;1m\u001b[1;3mItaly, a European country with a long Mediterranean coastline, has left a powerful mark on Western culture and cuisine. Its capital, Rome, is home to the Vatican as well as landmark art and ancient ruins. Other major cities include Florence, with Renaissance masterpieces such as Michelangelo’s \"David\" and Brunelleschi's Duomo; Venice, the city of canals; and Milan, Italy’s fashion capital. ― Google\u001b[0m\u001b[32;1m\u001b[1;3m I need to find out the population of Italy.\n", - "Action: Search\n", - "Action Input: Population of Italy\u001b[0m\n", - "\n", - "Observation:\u001b[36;1m\u001b[1;3mItaly, a European country with a long Mediterranean coastline, has left a powerful mark on Western culture and cuisine. Its capital, Rome, is home to the Vatican as well as landmark art and ancient ruins. Other major cities include Florence, with Renaissance masterpieces such as Michelangelo’s \"David\" and Brunelleschi's Duomo; Venice, the city of canals; and Milan, Italy’s fashion capital. ― Google\u001b[0m\u001b[32;1m\u001b[1;3m I now know the final answer.\n", - "Final Answer: Arrr, there be 60,483,973 people livin' in Italy as of 2020!\u001b[0m\n", + "Observation:\u001b[36;1m\u001b[1;3mThe current population of Mexico is 132,679,922 as of Tuesday, April 11, 2023, based on Worldometer elaboration of the latest United Nations data. Mexico 2020 ...\u001b[0m\u001b[32;1m\u001b[1;3m I now know the final answer.\n", + "Final Answer: Arrr, there be 132,679,922 people livin' in Mexico as of 2023!\u001b[0m\n", "\n", "\u001b[1m> Finished chain.\u001b[0m\n" ] @@ -537,43 +532,22 @@ { "data": { "text/plain": [ - "\"Arrr, there be 60,483,973 people livin' in Italy as of 2020!\"" - ] - }, - "execution_count": 38, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "agent_executor.run(\"how about in italy?\")" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "04956770", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'Italy, a European country with a long Mediterranean coastline, has left a powerful mark on Western culture and cuisine. Its capital, Rome, is home to the Vatican as well as landmark art and ancient ruins. Other major cities include Florence, with Renaissance masterpieces such as Michelangelo’s \"David\" and Brunelleschi\\'s Duomo; Venice, the city of canals; and Milan, Italy’s fashion capital. ― Google'" + "\"Arrr, there be 132,679,922 people livin' in Mexico as of 2023!\"" ] }, - "execution_count": 39, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "search.run(\"italy population\")" + "agent_executor.run(\"how about in mexico?\")" ] }, { "cell_type": "code", "execution_count": null, - "id": "8dd1b9e4", + "id": "bd820a7a", "metadata": {}, "outputs": [], "source": []