From d67807ca2ebc25ebb960aad50baa236881ca9141 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 22 Mar 2025 18:29:27 +0800 Subject: [PATCH] feat: Extend SchemaProperty and Parameter structures with new fields - Add Items field to SchemaProperty for better JSON Schema representation. - Introduce Strict field to Parameter for enhanced parameter validation options. - Improve data structure flexibility for future tool enhancements. --- neo/assistant/tool.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neo/assistant/tool.go b/neo/assistant/tool.go index 60fc7579..33bb243c 100644 --- a/neo/assistant/tool.go +++ b/neo/assistant/tool.go @@ -19,8 +19,9 @@ type Tool struct { // SchemaProperty represents a JSON Schema property type SchemaProperty struct { - Type string `json:"type,omitempty"` - Description string `json:"description,omitempty"` + Type string `json:"type,omitempty"` + Description string `json:"description,omitempty"` + Items Parameter `json:"items,omitempty"` } // Parameter represents the parameters field in function calling format @@ -29,6 +30,7 @@ type Parameter struct { Properties map[string]SchemaProperty `json:"properties,omitempty"` Required []string `json:"required,omitempty"` AdditionalProperties bool `json:"additionalProperties"` + Strict bool `json:"strict,omitempty"` } // Example returns a formatted example of how to use this tool