Yeuoly 7 hónapja%!(EXTRA string=óta)
szülő
commit
24c9665b2b

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

@@ -110,7 +110,7 @@ type ToolDeclaration struct {
 
 func isJSONSchema(fl validator.FieldLevel) bool {
 	// get schema from interface
-	schemaMap, ok := fl.Field().Interface().(map[string]any)
+	schemaMap, ok := fl.Field().Interface().(ToolOutputSchema)
 	if !ok {
 		return false
 	}

+ 1 - 1
internal/types/entities/plugin_entities/tool_declaration_test.go

@@ -1178,7 +1178,7 @@ func TestParameterScope_Validate(t *testing.T) {
 
 func TestInvalidJSONSchemaToolProvider_Validate(t *testing.T) {
 	type Test struct {
-		Text map[string]any `json:"text" validate:"json_schema"`
+		Text ToolOutputSchema `json:"text" validate:"json_schema"`
 	}
 
 	data := parser.MarshalJsonBytes(Test{