Skip to content

Commit

Permalink
refine haystack
Browse files Browse the repository at this point in the history
Signed-off-by: ChengZi <[email protected]>
  • Loading branch information
zc277584121 committed Jul 3, 2024
1 parent b819819 commit c10f1c5
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"from haystack.components.embedders import OpenAIDocumentEmbedder, OpenAITextEmbedder\n",
"from haystack.components.preprocessors import DocumentSplitter\n",
"from haystack.components.writers import DocumentWriter\n",
"from haystack.utils import Secret\n",
"\n",
"from milvus_haystack import MilvusDocumentStore\n",
"from milvus_haystack.milvus_embedding_retriever import MilvusEmbeddingRetriever\n",
Expand All @@ -149,7 +150,7 @@
"document_store = MilvusDocumentStore(\n",
" connection_args={\"uri\": \"./milvus.db\"},\n",
" # connection_args={\"uri\": \"http://localhost:19530\"},\n",
" # connection_args={\"uri\": YOUR_ZILLIZ_CLOUD_URI, \"token\": YOUR_ZILLIZ_API_KEY},\n",
" # connection_args={\"uri\": YOUR_ZILLIZ_CLOUD_URI, \"token\": Secret.from_env_var(\"ZILLIZ_CLOUD_API_KEY\")},\n",
" drop_old=True,\n",
")"
],
Expand Down Expand Up @@ -368,6 +369,18 @@
")\n",
"print(\"RAG answer:\", results[\"generator\"][\"replies\"][0])"
]
},
{
"cell_type": "markdown",
"source": [
"For more information about how to use milvus-haystack, please refer to the [milvus-haystack Readme](https://github.com/milvus-io/milvus-haystack)."
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
}
],
"metadata": {
Expand Down

0 comments on commit c10f1c5

Please sign in to comment.