mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 13:33:37 +00:00
Fix return metadata when searching for DingoDB (#12937)
This commit is contained in:
@@ -104,11 +104,11 @@
|
||||
"source": [
|
||||
"from dingodb import DingoDB\n",
|
||||
"\n",
|
||||
"index_name = \"langchain-demo\"\n",
|
||||
"index_name = \"langchain_demo\"\n",
|
||||
"\n",
|
||||
"dingo_client = DingoDB(user=\"\", password=\"\", host=[\"127.0.0.1:13000\"])\n",
|
||||
"# First, check if our index already exists. If it doesn't, we create it\n",
|
||||
"if index_name not in dingo_client.get_index():\n",
|
||||
"if index_name not in dingo_client.get_index() and index_name.upper() not in dingo_client.get_index():\n",
|
||||
" # we create a new index, modify to your own\n",
|
||||
" dingo_client.create_index(\n",
|
||||
" index_name=index_name, dimension=1536, metric_type=\"cosine\", auto_id=False\n",
|
||||
|
Reference in New Issue
Block a user