Minor updates to ReRank template (#12388)

This commit is contained in:
Lance Martin
2023-10-26 16:05:17 -07:00
committed by GitHub
parent 7cadf00570
commit b8af5b0a8e
2 changed files with 15 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ langchain = ">=0.0.313, <0.1"
openai = ">=0.28.1" openai = ">=0.28.1"
tiktoken = ">=0.5.1" tiktoken = ">=0.5.1"
pinecone-client = ">=2.2.4" pinecone-client = ">=2.2.4"
cohere = ">4.32" cohere = ">=4.32"
[tool.langserve] [tool.langserve]
export_module = "rag_pinecone_rerank" export_module = "rag_pinecone_rerank"

View File

@@ -11,13 +11,24 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 3,
"id": "d774be2a", "id": "d774be2a",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"data": {
"text/plain": [
"'The agent memory consists of two components: short-term memory and long-term memory. The short-term memory is used for in-context learning and allows the model to learn from its experiences. The long-term memory enables the agent to retain and recall an infinite amount of information over extended periods by leveraging an external vector store and fast retrieval.'"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"from langserve.client import RemoteRunnable\n", "from langserve.client import RemoteRunnable\n",
"rag_app_pinecone = RemoteRunnable('http://localhost:8000/rag-pinecone-rerank')\n", "rag_app_pinecone = RemoteRunnable('http://localhost:8001/rag_pinecone_rerank')\n",
"rag_app_pinecone.invoke(\"How does agent memory work?\")" "rag_app_pinecone.invoke(\"How does agent memory work?\")"
] ]
} }