|
|
|
@ -116,10 +116,10 @@ class ToolParameterOption(BaseModel):
|
|
|
|
value: str = Field(..., description="The value of the option")
|
|
|
|
value: str = Field(..., description="The value of the option")
|
|
|
|
label: I18nObject = Field(..., description="The label of the option")
|
|
|
|
label: I18nObject = Field(..., description="The label of the option")
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
|
|
|
@field_validator('value', mode='before')
|
|
|
|
@field_validator('value', mode='before')
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def transform_id_to_str(cls, value) -> str:
|
|
|
|
def transform_id_to_str(cls, value) -> str:
|
|
|
|
if isinstance(value, bool):
|
|
|
|
if not isinstance(value, str):
|
|
|
|
return str(value)
|
|
|
|
return str(value)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return value
|
|
|
|
return value
|
|
|
|
|