update zilliz example (#3578)

1. Now the Zilliz example can't connect to Zilliz Cloud, fixed

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
pull/3587/head^2
Sheldon 1 year ago committed by GitHub
parent bd7e0a534c
commit 399065e858
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,8 +55,9 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# replace \n", "# replace \n",
"ZILLIZ_CLOUD_HOSTNAME = \"\" # example: \"in01-17f69c292d4a50a.aws-us-west-2.vectordb.zillizcloud.com\"\n", "ZILLIZ_CLOUD_URI = \"\" # example: \"https://in01-17f69c292d4a5sa.aws-us-west-2.vectordb.zillizcloud.com:19536\"\n",
"ZILLIZ_CLOUD_PORT = \"\" #example: \"19532\"" "ZILLIZ_CLOUD_USERNAME = \"\" # example: \"username\"\n",
"ZILLIZ_CLOUD_PASSWORD = \"\" # example: \"*********\""
] ]
}, },
{ {
@ -98,7 +99,12 @@
"vector_db = Milvus.from_documents(\n", "vector_db = Milvus.from_documents(\n",
" docs,\n", " docs,\n",
" embeddings,\n", " embeddings,\n",
" connection_args={\"host\": ZILLIZ_CLOUD_HOSTNAME, \"port\": ZILLIZ_CLOUD_PORT},\n", " connection_args={\n",
" \"uri\": ZILLIZ_CLOUD_URI,\n",
" \"username\": ZILLIZ_CLOUD_USERNAME,\n",
" \"password\": ZILLIZ_CLOUD_PASSWORD,\n",
" \"secure\": True\n",
" }\n",
")" ")"
] ]
}, },
@ -139,7 +145,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.6" "version": "3.9.6"
} }
}, },
"nbformat": 4, "nbformat": 4,

Loading…
Cancel
Save