mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-04 04:28:58 +00:00
docs: fix milvus import and update template (#22306)
docs: fix milvus import problem update milvus-rag template with milvus-lite Signed-off-by: ChengZi <chen.zhang@zilliz.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"\n",
|
||||
"I have used the cloud version of Milvus, thus I need `uri` and `token` as well.\n",
|
||||
"\n",
|
||||
"NOTE: The self-query retriever requires you to have `lark` installed (`pip install lark`). We also need the `pymilvus` package."
|
||||
"NOTE: The self-query retriever requires you to have `lark` installed (`pip install lark`). We also need the `langchain_milvus` package."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -29,16 +29,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install --upgrade --quiet lark"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install --upgrade --quiet pymilvus"
|
||||
"%pip install --upgrade --quiet lark langchain_milvus"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -67,8 +58,8 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.vectorstores import Milvus\n",
|
||||
"from langchain_core.documents import Document\n",
|
||||
"from langchain_milvus.vectorstores import Milvus\n",
|
||||
"from langchain_openai import OpenAIEmbeddings\n",
|
||||
"\n",
|
||||
"embeddings = OpenAIEmbeddings()"
|
||||
@@ -388,4 +379,4 @@
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
}
|
@@ -23,7 +23,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install --upgrade --quiet pymilvus"
|
||||
"%pip install --upgrade --quiet langchain_milvus"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -67,7 +67,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.document_loaders import TextLoader\n",
|
||||
"from langchain_community.vectorstores import Milvus\n",
|
||||
"from langchain_milvus.vectorstores import Milvus\n",
|
||||
"from langchain_openai import OpenAIEmbeddings\n",
|
||||
"from langchain_text_splitters import CharacterTextSplitter"
|
||||
]
|
||||
|
Reference in New Issue
Block a user