Skip to content

Commit

Permalink
chore: update openai models and (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
henomis authored May 14, 2024
1 parent 863ce5c commit df89647
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/henomis/qdrant-go v1.1.0
github.com/henomis/restclientgo v1.2.0
github.com/invopop/jsonschema v0.7.0
github.com/sashabaranov/go-openai v1.19.2
github.com/sashabaranov/go-openai v1.24.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sashabaranov/go-openai v1.19.2 h1:+dkuCADSnwXV02YVJkdphY8XD9AyHLUWwk6V7LB6EL8=
github.com/sashabaranov/go-openai v1.19.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/sashabaranov/go-openai v1.24.0 h1:4H4Pg8Bl2RH/YSnU8DYumZbuHnnkfioor/dtNlB20D4=
github.com/sashabaranov/go-openai v1.24.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
Expand Down
5 changes: 5 additions & 0 deletions llm/openai/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ const (
GPT432K Model = openai.GPT432K
GPT40613 Model = openai.GPT40613
GPT40314 Model = openai.GPT40314
GPT4o Model = openai.GPT4o
GPT4o20240513 Model = openai.GPT4o20240513
GPT4Turbo Model = openai.GPT4Turbo
GPT4Turbo20240409 Model = openai.GPT4Turbo20240409
GPT4Turbo0125 Model = openai.GPT4Turbo0125
GPT4Turbo1106 Model = openai.GPT4Turbo1106
GPT4TurboPreview Model = openai.GPT4TurboPreview
GPT4VisionPreview Model = openai.GPT4VisionPreview
GPT4 Model = openai.GPT4
GPT3Dot5Turbo0125 Model = openai.GPT3Dot5Turbo0125
GPT3Dot5Turbo1106 Model = openai.GPT3Dot5Turbo1106
GPT3Dot5Turbo0613 Model = openai.GPT3Dot5Turbo0613
GPT3Dot5Turbo0301 Model = openai.GPT3Dot5Turbo0301
Expand Down
2 changes: 1 addition & 1 deletion llm/openai/openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func (o *OpenAI) getChatCompletionRequestTools() []openai.Tool {
for _, function := range o.functions {
tools = append(tools, openai.Tool{
Type: "function",
Function: openai.FunctionDefinition{
Function: &openai.FunctionDefinition{
Name: function.Name,
Description: function.Description,
Parameters: function.Parameters,
Expand Down

0 comments on commit df89647

Please sign in to comment.