refac
This commit is contained in:
1 parent
d5f13dd9e0
commit
522afbb0a0
7 files changed
+240
-127
No files matched your search
@@ -0,0 +1,39 @@
|
||||
from pymilvus import MilvusClient as Milvus
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from open_webui.apps.rag.vector.main import VectorItem, QueryResult
|
||||
|
||||
|
||||
class MilvusClient:
|
||||
def __init__(self):
|
||||
self.client = Milvus()
|
||||
|
||||
def list_collections(self) -> list[str]:
|
||||
pass
|
||||
|
||||
def create_collection(self, collection_name: str):
|
||||
pass
|
||||
|
||||
def delete_collection(self, collection_name: str):
|
||||
pass
|
||||
|
||||
def search(
|
||||
self, collection_name: str, vectors: list[list[float | int]], limit: int
|
||||
) -> Optional[QueryResult]:
|
||||
pass
|
||||
|
||||
def get(self, collection_name: str) -> Optional[QueryResult]:
|
||||
pass
|
||||
|
||||
def insert(self, collection_name: str, items: list[VectorItem]):
|
||||
pass
|
||||
|
||||
def upsert(self, collection_name: str, items: list[VectorItem]):
|
||||
pass
|
||||
|
||||
def delete(self, collection_name: str, ids: list[str]):
|
||||
pass
|
||||
|
||||
def reset(self):
|
||||
pass
|
||||
Reference in new issue
Block a user