Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Dec 24, 2024
1 parent 1a694a9 commit 24c9665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 24c9665

Please sign in to comment.