mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-17 15:35:14 +00:00
Minor updates to ReRank template (#12388)
This commit is contained in:
@@ -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"
|
||||||
|
@@ -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?\")"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user