Skip to content

Commit

Permalink
docs: fix milvus import and update template (#22306)
Browse files Browse the repository at this point in the history
docs: fix milvus import problem
update milvus-rag template with milvus-lite

Signed-off-by: ChengZi <chen.zhang@zilliz.com>
  • Loading branch information
zc277584121 authored May 30, 2024
1 parent 86698b0 commit 2443e85
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 375 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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"
]
},
{
Expand Down Expand Up @@ -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()"
Expand Down Expand Up @@ -388,4 +379,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
4 changes: 2 additions & 2 deletions docs/docs/integrations/vectorstores/milvus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"outputs": [],
"source": [
"%pip install --upgrade --quiet pymilvus"
"%pip install --upgrade --quiet langchain_milvus"
]
},
{
Expand Down Expand Up @@ -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"
]
Expand Down
8 changes: 4 additions & 4 deletions libs/partners/milvus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ pip install -U langchain-milvus

## Milvus vector database

See a [usage example](https://python.langchain.com/docs/integrations/vectorstores/milvus/)
See a [usage example](https://python.langchain.com/v0.2/docs/integrations/vectorstores/milvus/)

```python
from langchain_milvus import Milvus
```

## Milvus hybrid search

See a [usage example](https://python.langchain.com/docs/integrations/retrievers/milvus_hybrid_search/).
See a [usage example](https://python.langchain.com/v0.2/docs/integrations/retrievers/milvus_hybrid_search/).

```python
from langchain_milvus import MilvusCollectionHybridSearchRetriever
Expand All @@ -27,15 +27,15 @@ from langchain_milvus import MilvusCollectionHybridSearchRetriever

## Zilliz Cloud vector database

See a [usage example](https://python.langchain.com/docs/integrations/vectorstores/zilliz/).
See a [usage example](https://python.langchain.com/v0.2/docs/integrations/vectorstores/zilliz/).

```python
from langchain_milvus import Zilliz
```

## Zilliz Cloud Pipeline Retriever

See a [usage example](https://python.langchain.com/docs/integrations/retrievers/zilliz_cloud_pipeline).
See a [usage example](https://python.langchain.com/v0.2/docs/integrations/retrievers/zilliz_cloud_pipeline/).

```python
from langchain_milvus import ZillizCloudPipelineRetriever
Expand Down
Loading

0 comments on commit 2443e85

Please sign in to comment.