Add image

This commit is contained in:
William Fu-Hinthorn
2024-01-18 08:34:50 -08:00
parent 9aefcc20af
commit d6c1c58f19
2 changed files with 6 additions and 41 deletions
@@ -13,6 +13,8 @@
"\n",
"Below, we will create an agent group, with an agent supervisor to help delegate tasks.\n",
"\n",
"![diagram](./img/supervisor-diagram.png)\n",
"\n",
"To simplify each agent node, we will use the AgentExecutor class from LangChain."
]
},
@@ -23,26 +25,8 @@
"metadata": {},
"outputs": [],
"source": [
"# %%capture --no-stderr\n",
"# %pip install -U langchain langchain_openai langchain_experimental langsmith pandas"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "f5b02e36-3b2e-485e-ac55-c3523c42ec58",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"env: LANGCHAIN_API_KEY=ls__4f8a0a0114d145a08a0c3c7f5631289c\n"
]
}
],
"source": [
"%env LANGCHAIN_API_KEY=ls__4f8a0a0114d145a08a0c3c7f5631289c"
"%%capture --no-stderr\n",
"%pip install -U langchain langchain_openai langchain_experimental langsmith pandas"
]
},
{
@@ -281,29 +265,10 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "56ba78e9-d9c1-457c-a073-d606d5d3e013",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Rate limit exceeded for https://api.smith.langchain.com/runs/e906b9ec-0dc1-4f78-b5d1-d6da08bac093. HTTPError('429 Client Error: Too Many Requests for url: https://api.smith.langchain.com/runs/e906b9ec-0dc1-4f78-b5d1-d6da08bac093', '{\"detail\":\"Hourly usage limit exceeded\"}')\n",
"Rate limit exceeded for https://api.smith.langchain.com/runs. HTTPError('429 Client Error: Too Many Requests for url: https://api.smith.langchain.com/runs', '{\"detail\":\"Hourly usage limit exceeded\"}')\n",
"Python REPL can execute arbitrary code. Use with caution.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"================================\u001b[1m Human Message \u001b[0m=================================\n",
"\n",
"The code `print('Hello, World!')` has been executed, and it printed `Hello, World!` to the terminal.\n"
]
}
],
"outputs": [],
"source": [
"results = graph.invoke(\"Code hello world and print it to the terminal\")\n",
"results[\"messages\"][-1].pretty_print()"
Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB