mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
20 lines
404 B
Python
20 lines
404 B
Python
from pydantic import BaseModel
|
|
from typing import Optional, List, Any
|
|
|
|
|
|
class VectorItem(BaseModel):
|
|
id: str
|
|
text: str
|
|
vector: List[float | int]
|
|
metadata: Any
|
|
|
|
|
|
class GetResult(BaseModel):
|
|
ids: Optional[List[List[str]]]
|
|
documents: Optional[List[List[str]]]
|
|
metadatas: Optional[List[List[Any]]]
|
|
|
|
|
|
class SearchResult(GetResult):
|
|
distances: Optional[List[List[float | int]]]
|