Browse Source

fix: support precision to agent/tool parameter rule

Yeuoly 7 months ago
parent
commit
f2ff1abba5

+ 1 - 0
internal/types/entities/plugin_entities/agent_declaration.go

@@ -66,6 +66,7 @@ type AgentStrategyParameter struct {
 	Default      any                        `json:"default" yaml:"default" validate:"omitempty,is_basic_type"`
 	Min          *float64                   `json:"min" yaml:"min" validate:"omitempty"`
 	Max          *float64                   `json:"max" yaml:"max" validate:"omitempty"`
+	Precision    *int                       `json:"precision" yaml:"precision" validate:"omitempty"`
 	Options      []ToolParameterOption      `json:"options" yaml:"options" validate:"omitempty,dive"`
 }
 

+ 1 - 0
internal/types/entities/plugin_entities/tool_declaration.go

@@ -119,6 +119,7 @@ type ToolParameter struct {
 	Default          any                    `json:"default" yaml:"default" validate:"omitempty,is_basic_type"`
 	Min              *float64               `json:"min" yaml:"min" validate:"omitempty"`
 	Max              *float64               `json:"max" yaml:"max" validate:"omitempty"`
+	Precision        *int                   `json:"precision" yaml:"precision" validate:"omitempty"`
 	Options          []ToolParameterOption  `json:"options" yaml:"options" validate:"omitempty,dive"`
 }