mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-08-17 10:20:35 +03:00
feat(assistants): Add new input models for boolean, number, select text, and select number
This commit is contained in:
parent
861931f231
commit
6fa583b6a8
@ -29,10 +29,34 @@ class TextInput(BaseModel):
|
||||
value: str
|
||||
|
||||
|
||||
class InputBoolean(BaseModel):
|
||||
key: str
|
||||
value: bool
|
||||
|
||||
|
||||
class InputNumber(BaseModel):
|
||||
key: str
|
||||
value: int
|
||||
|
||||
|
||||
class InputSelectText(BaseModel):
|
||||
key: str
|
||||
value: str
|
||||
|
||||
|
||||
class InputSelectNumber(BaseModel):
|
||||
key: str
|
||||
value: int
|
||||
|
||||
|
||||
class Inputs(BaseModel):
|
||||
files: Optional[List[FileInput]] = None
|
||||
urls: Optional[List[UrlInput]] = None
|
||||
texts: Optional[List[TextInput]] = None
|
||||
booleans: Optional[List[InputBoolean]] = None
|
||||
numbers: Optional[List[InputNumber]] = None
|
||||
select_texts: Optional[List[InputSelectText]] = None
|
||||
select_numbers: Optional[List[InputSelectNumber]] = None
|
||||
|
||||
|
||||
class Outputs(BaseModel):
|
||||
|
@ -20,12 +20,49 @@ class InputText(BaseModel):
|
||||
key: str
|
||||
required: Optional[bool] = True
|
||||
description: str
|
||||
validation_regex: Optional[str] = None
|
||||
|
||||
|
||||
class InputBoolean(BaseModel):
|
||||
key: str
|
||||
required: Optional[bool] = True
|
||||
description: str
|
||||
|
||||
|
||||
class InputNumber(BaseModel):
|
||||
key: str
|
||||
required: Optional[bool] = True
|
||||
description: str
|
||||
min: Optional[int] = None
|
||||
max: Optional[int] = None
|
||||
increment: Optional[int] = None
|
||||
default: Optional[int] = None
|
||||
|
||||
|
||||
class InputSelectText(BaseModel):
|
||||
key: str
|
||||
required: Optional[bool] = True
|
||||
description: str
|
||||
options: List[str]
|
||||
default: Optional[str] = None
|
||||
|
||||
|
||||
class InputSelectNumber(BaseModel):
|
||||
key: str
|
||||
required: Optional[bool] = True
|
||||
description: str
|
||||
options: List[int]
|
||||
default: Optional[int] = None
|
||||
|
||||
|
||||
class Inputs(BaseModel):
|
||||
files: Optional[List[InputFile]] = None
|
||||
urls: Optional[List[InputUrl]] = None
|
||||
texts: Optional[List[InputText]] = None
|
||||
booleans: Optional[List[InputBoolean]] = None
|
||||
numbers: Optional[List[InputNumber]] = None
|
||||
select_texts: Optional[List[InputSelectText]] = None
|
||||
select_numbers: Optional[List[InputSelectNumber]] = None
|
||||
|
||||
|
||||
class OutputEmail(BaseModel):
|
||||
|
Loading…
Reference in New Issue
Block a user