Skip to content

Commit

Permalink
Minor updates to ReRank template (langchain-ai#12388)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlancemartin authored and jakubno committed Nov 1, 2023
1 parent a8255f2 commit 7dab9cc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/rag-pinecone-rerank/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ langchain = ">=0.0.313, <0.1"
openai = ">=0.28.1"
tiktoken = ">=0.5.1"
pinecone-client = ">=2.2.4"
cohere = ">4.32"
cohere = ">=4.32"

[tool.langserve]
export_module = "rag_pinecone_rerank"
Expand Down
17 changes: 14 additions & 3 deletions templates/rag-pinecone-rerank/rag_pinecone_rerank.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "d774be2a",
"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": [
"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?\")"
]
}
Expand Down

0 comments on commit 7dab9cc

Please sign in to comment.