mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 09:09:53 +00:00
17 lines
373 B
Python
17 lines
373 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 QueryResult(BaseModel):
|
|
ids: Optional[List[List[str]]]
|
|
distances: Optional[List[List[float | int]]]
|
|
documents: Optional[List[List[str]]]
|
|
metadatas: Optional[List[List[Any]]]
|