2024-04-10 14:28:22 +03:00
|
|
|
from typing import List, Optional
|
|
|
|
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
|
|
|
class InputFile(BaseModel):
|
|
|
|
key: str
|
|
|
|
allowed_extensions: Optional[List[str]] = ["pdf"]
|
|
|
|
required: Optional[bool] = True
|
|
|
|
description: str
|
|
|
|
|
|
|
|
|
|
|
|
class InputUrl(BaseModel):
|
|
|
|
key: str
|
|
|
|
required: Optional[bool] = True
|
|
|
|
description: str
|
|
|
|
|
|
|
|
|
|
|
|
class InputText(BaseModel):
|
|
|
|
key: str
|
|
|
|
required: Optional[bool] = True
|
|
|
|
description: str
|
|
|
|
|
|
|
|
|
|
|
|
class Inputs(BaseModel):
|
|
|
|
files: Optional[List[InputFile]] = None
|
|
|
|
urls: Optional[List[InputUrl]] = None
|
|
|
|
texts: Optional[List[InputText]] = None
|
|
|
|
|
|
|
|
|
|
|
|
class OutputEmail(BaseModel):
|
|
|
|
required: Optional[bool] = True
|
|
|
|
description: str
|
|
|
|
type: str
|
|
|
|
|
|
|
|
|
|
|
|
class OutputBrain(BaseModel):
|
|
|
|
required: Optional[bool] = True
|
|
|
|
description: str
|
|
|
|
type: str
|
|
|
|
|
|
|
|
|
|
|
|
class Outputs(BaseModel):
|
|
|
|
email: Optional[OutputEmail] = None
|
|
|
|
brain: Optional[OutputBrain] = None
|
|
|
|
|
|
|
|
|
|
|
|
class AssistantOutput(BaseModel):
|
|
|
|
name: str
|
2024-04-11 19:42:01 +03:00
|
|
|
tags: Optional[List[str]] = []
|
2024-04-10 14:28:22 +03:00
|
|
|
input_description: str
|
|
|
|
output_description: str
|
|
|
|
inputs: Inputs
|
|
|
|
outputs: Outputs
|
2024-04-11 19:31:16 +03:00
|
|
|
icon_url: Optional[str] = None
|