Skip to content

Commit a7d2d94

Browse files
bug: remove duplicate field which breaks tooldef rendering
1 parent 3e8b23c commit a7d2d94

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

gptscript_test.go

+16-16
Original file line numberDiff line numberDiff line change
@@ -696,14 +696,14 @@ func TestFmt(t *testing.T) {
696696
ToolDef: ToolDef{
697697
Name: "echo",
698698
Instructions: "#!/bin/bash\necho hello there",
699-
},
700-
Arguments: &openapi3.Schema{
701-
Type: &openapi3.Types{"object"},
702-
Properties: map[string]*openapi3.SchemaRef{
703-
"input": {
704-
Value: &openapi3.Schema{
705-
Description: "The string input to echo",
706-
Type: &openapi3.Types{"string"},
699+
Arguments: &openapi3.Schema{
700+
Type: &openapi3.Types{"object"},
701+
Properties: map[string]*openapi3.SchemaRef{
702+
"input": {
703+
Value: &openapi3.Schema{
704+
Description: "The string input to echo",
705+
Type: &openapi3.Types{"string"},
706+
},
707707
},
708708
},
709709
},
@@ -757,14 +757,14 @@ func TestFmtWithTextNode(t *testing.T) {
757757
ToolDef: ToolDef{
758758
Instructions: "#!/bin/bash\necho hello there",
759759
Name: "echo",
760-
},
761-
Arguments: &openapi3.Schema{
762-
Type: &openapi3.Types{"object"},
763-
Properties: map[string]*openapi3.SchemaRef{
764-
"input": {
765-
Value: &openapi3.Schema{
766-
Description: "The string input to echo",
767-
Type: &openapi3.Types{"string"},
760+
Arguments: &openapi3.Schema{
761+
Type: &openapi3.Types{"object"},
762+
Properties: map[string]*openapi3.SchemaRef{
763+
"input": {
764+
Value: &openapi3.Schema{
765+
Description: "The string input to echo",
766+
Type: &openapi3.Types{"string"},
767+
},
768768
},
769769
},
770770
},

tool.go

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ type ToolNode struct {
105105
type Tool struct {
106106
ToolDef `json:",inline"`
107107
ID string `json:"id,omitempty"`
108-
Arguments *openapi3.Schema `json:"arguments,omitempty"`
109108
ToolMapping map[string][]ToolReference `json:"toolMapping,omitempty"`
110109
LocalTools map[string]string `json:"localTools,omitempty"`
111110
Source ToolSource `json:"source,omitempty"`

0 commit comments

Comments
 (0)