Minor template cleaning (#12573)

This commit is contained in:
Lance Martin
2023-10-30 11:27:44 -07:00
committed by GitHub
parent b1e3843931
commit 08103e6d48
5 changed files with 28 additions and 140 deletions

View File

@@ -5,30 +5,6 @@
"cell_type": "markdown",
"id": "9faf648c-541e-4368-82a8-96287dbf34de",
"metadata": {},
"source": [
"## Document Loading\n",
"\n",
"Load a blog post on agents."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "662a843a-49e8-40ec-bd32-0f44bc4159a1",
"metadata": {},
"outputs": [],
"source": [
"from langchain.document_loaders import WebBaseLoader\n",
"\n",
"loader = WebBaseLoader(\"https://lilianweng.github.io/posts/2023-06-23-agent/\")\n",
"text = loader.load()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "67306dbd-d79c-4723-825e-7d88edb811ba",
"metadata": {},
"source": [
"## Run Template\n",
"\n",
@@ -41,14 +17,13 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3668ba4b-254e-4a3b-bfb5-53242572cb1b",
"id": "2dfe28bb-6112-459b-a77d-013964b65409",
"metadata": {},
"outputs": [],
"source": [
"from langserve.client import RemoteRunnable\n",
"\n",
"llama2_function = RemoteRunnable(\"http://0.0.0.0:8001/llama2_functions\")\n",
"llama2_function.invoke({\"input\": text[0].page_content[0:1500]})"
"llama2_function.invoke({\"question\":\"How does agent memory work?\"})"
]
}
],