improve: generalize tool parameter converter (#4786)

This commit is contained in:
Bowen Liang
2024-06-03 21:26:58 +08:00
committed by GitHub
parent 3c8a120e51
commit 3542d55e67
10 changed files with 143 additions and 114 deletions

View File

@@ -116,8 +116,9 @@ class ToolParameterOption(BaseModel):
value: str = Field(..., description="The value of the option")
label: I18nObject = Field(..., description="The label of the option")
class ToolParameter(BaseModel):
class ToolParameterType(Enum):
class ToolParameterType(str, Enum):
STRING = "string"
NUMBER = "number"
BOOLEAN = "boolean"