Skip to content

Commit 65136ee

Browse files
authored
Merge pull request #453 from njhale/chore/bump-openapi
chore: bump kin-openapi dependency
2 parents 9d18bb3 + 1e0d8e9 commit 65136ee

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/docker/cli v26.0.0+incompatible
1313
github.com/docker/docker-credential-helpers v0.8.1
1414
github.com/fatih/color v1.17.0
15-
github.com/getkin/kin-openapi v0.123.0
15+
github.com/getkin/kin-openapi v0.124.0
1616
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
1717
github.com/google/uuid v1.6.0
1818
github.com/gptscript-ai/chat-completion-client v0.0.0-20240531200700-af8e7ecf0379

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUork
114114
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
115115
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
116116
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
117-
github.com/getkin/kin-openapi v0.123.0 h1:zIik0mRwFNLyvtXK274Q6ut+dPh6nlxBp0x7mNrPhs8=
118-
github.com/getkin/kin-openapi v0.123.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
117+
github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M=
118+
github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM=
119119
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
120120
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
121121
github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q=

pkg/loader/openapi.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func getOpenAPITools(t *openapi3.T, defaultHost string) ([]types.Tool, error) {
136136
Name: operation.OperationID,
137137
Description: toolDesc,
138138
Arguments: &openapi3.Schema{
139-
Type: "object",
139+
Type: &openapi3.Types{"object"},
140140
Properties: openapi3.Schemas{},
141141
Required: []string{},
142142
},

pkg/parser/parser.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func csv(line string) (result []string) {
5151
func addArg(line string, tool *types.Tool) error {
5252
if tool.Parameters.Arguments == nil {
5353
tool.Parameters.Arguments = &openapi3.Schema{
54-
Type: "object",
54+
Type: &openapi3.Types{"object"},
5555
Properties: openapi3.Schemas{},
5656
}
5757
}
@@ -64,7 +64,7 @@ func addArg(line string, tool *types.Tool) error {
6464
tool.Parameters.Arguments.Properties[key] = &openapi3.SchemaRef{
6565
Value: &openapi3.Schema{
6666
Description: strings.TrimSpace(value),
67-
Type: "string",
67+
Type: &openapi3.Types{"string"},
6868
},
6969
}
7070

pkg/system/prompt.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ You don't move to the next step until you have a result.
2727
var DefaultPromptParameter = "defaultPromptParameter"
2828

2929
var DefaultToolSchema = openapi3.Schema{
30-
Type: "object",
30+
Type: &openapi3.Types{"object"},
3131
Properties: openapi3.Schemas{
3232
DefaultPromptParameter: &openapi3.SchemaRef{
3333
Value: &openapi3.Schema{
3434
Description: "Prompt to send to the tool or assistant. This may be instructions or question.",
35-
Type: "string",
35+
Type: &openapi3.Types{"string"},
3636
},
3737
},
3838
},

pkg/types/jsonschema.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import (
66

77
func ObjectSchema(kv ...string) *openapi3.Schema {
88
s := &openapi3.Schema{
9-
Type: "object",
9+
Type: &openapi3.Types{"object"},
1010
Properties: openapi3.Schemas{},
1111
}
1212
for i, v := range kv {
1313
if i%2 == 1 {
1414
s.Properties[kv[i-1]] = &openapi3.SchemaRef{
1515
Value: &openapi3.Schema{
1616
Description: v,
17-
Type: "string",
17+
Type: &openapi3.Types{"string"},
1818
},
1919
}
2020
}

0 commit comments

Comments
 (0)