From f2ff1abba552f977e318c4e73d40d42d02fddafa Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Fri, 27 Dec 2024 18:06:36 +0800 Subject: [PATCH] fix: support precision to agent/tool parameter rule --- internal/types/entities/plugin_entities/agent_declaration.go | 1 + internal/types/entities/plugin_entities/tool_declaration.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/types/entities/plugin_entities/agent_declaration.go b/internal/types/entities/plugin_entities/agent_declaration.go index fbea013..c485950 100644 --- a/internal/types/entities/plugin_entities/agent_declaration.go +++ b/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"` } diff --git a/internal/types/entities/plugin_entities/tool_declaration.go b/internal/types/entities/plugin_entities/tool_declaration.go index f493d79..7b5b512 100644 --- a/internal/types/entities/plugin_entities/tool_declaration.go +++ b/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"` }