mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
16
backend/open_webui/apps/rag/vector/main.py
Normal file
16
backend/open_webui/apps/rag/vector/main.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List, Any
|
||||
|
||||
|
||||
class VectorItem(BaseModel):
|
||||
id: str
|
||||
text: str
|
||||
vector: List[float | int]
|
||||
metadata: Any
|
||||
|
||||
|
||||
class QueryResult(BaseModel):
|
||||
ids: Optional[List[List[str]]]
|
||||
distances: Optional[List[List[float | int]]]
|
||||
documents: Optional[List[List[str]]]
|
||||
metadatas: Optional[List[List[Any]]]
|
||||
Reference in New Issue
Block a user