fix: support float type for tool parameter's default value (#7644)
This commit is contained in:
parent
13be84e4d4
commit
ba82023445
2 changed files with 2 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ class ToolParameter(BaseModel):
|
||||||
form: ToolParameterForm = Field(..., description="The form of the parameter, schema/form/llm")
|
form: ToolParameterForm = Field(..., description="The form of the parameter, schema/form/llm")
|
||||||
llm_description: Optional[str] = None
|
llm_description: Optional[str] = None
|
||||||
required: Optional[bool] = False
|
required: Optional[bool] = False
|
||||||
default: Optional[Union[int, str]] = None
|
default: Optional[Union[float, int, str]] = None
|
||||||
min: Optional[Union[float, int]] = None
|
min: Optional[Union[float, int]] = None
|
||||||
max: Optional[Union[float, int]] = None
|
max: Optional[Union[float, int]] = None
|
||||||
options: Optional[list[ToolParameterOption]] = None
|
options: Optional[list[ToolParameterOption]] = None
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ parameters:
|
||||||
- name: guidance_scale
|
- name: guidance_scale
|
||||||
type: number
|
type: number
|
||||||
required: true
|
required: true
|
||||||
default: 7
|
default: 7.5
|
||||||
min: 0
|
min: 0
|
||||||
max: 100
|
max: 100
|
||||||
label:
|
label:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue