Skip to content

bug: send non-standard name field for Azure #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/gptscript-ai/gptscript

go 1.22.0

replace github.com/sashabaranov/go-openai => github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457
replace github.com/sashabaranov/go-openai => github.com/gptscript-ai/go-openai v0.0.0-20240330064700-d33320ca826f

require (
github.com/AlecAivazis/survey/v2 v2.3.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457 h1:ziAtY3K9pxk4Ua/0dQdndAopXyLlzguX9ECRbi8E9t4=
github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/gptscript-ai/go-openai v0.0.0-20240330064700-d33320ca826f h1:XSqwZIal7wCjmkV3Ncrvu5TAvXlaUnjGwygn21OTlh0=
github.com/gptscript-ai/go-openai v0.0.0-20240330064700-d33320ca826f/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
Expand Down
2 changes: 2 additions & 0 deletions pkg/openai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ func toMessages(request types.CompletionRequest) (result []openai.ChatCompletion

if message.ToolCall != nil {
chatMessage.ToolCallID = message.ToolCall.ID
// This field is not documented but specifically Azure thinks it should be set
chatMessage.Name = message.ToolCall.Function.Name
}

for _, content := range message.Content {
Expand Down