瀏覽代碼

fixbug: correct parameter name for MilvusClient instantiation

Replace incorrect parameter 'database=MILVUS_DB' with valid 'db_name=MILVUS_DB'
Perry Li 2 月之前
父節點
當前提交
67ed61d022
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/open_webui/retrieval/vector/dbs/milvus.py

+ 2 - 2
backend/open_webui/retrieval/vector/dbs/milvus.py

@@ -20,9 +20,9 @@ class MilvusClient:
     def __init__(self):
         self.collection_prefix = "open_webui"
         if MILVUS_TOKEN is None:
-            self.client = Client(uri=MILVUS_URI, database=MILVUS_DB)
+            self.client = Client(uri=MILVUS_URI, db_name=MILVUS_DB)
         else:
-            self.client = Client(uri=MILVUS_URI, database=MILVUS_DB, token=MILVUS_TOKEN)
+            self.client = Client(uri=MILVUS_URI, db_name=MILVUS_DB, token=MILVUS_TOKEN)
 
     def _result_to_get_result(self, result) -> GetResult:
         ids = []