Files
mchat/faiss/models.py
2026-04-10 12:47:39 +00:00

29 lines
423 B
Python

from typing import List
from pydantic import BaseModel
class EmbeddingInput(BaseModel):
embedding: List[float]
class SearchInput(BaseModel):
embedding: List[float]
k: int = 5
class IndexInsertInput(BaseModel):
idx: str
id: int
embedding: List[float]
class IndexSearchInput(BaseModel):
idx: str
embedding: List[float]
k: int = 5
class IndexDeleteInput(BaseModel):
idx: str