提供对话上下文索引
This commit is contained in:
@@ -1,10 +1,28 @@
|
||||
# models.py
|
||||
from pydantic import BaseModel
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class EmbeddingInput(BaseModel):
|
||||
embedding: List[float]
|
||||
|
||||
|
||||
class SearchInput(BaseModel):
|
||||
embedding: List[float]
|
||||
k: int = 5
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user