Skip to content

Commit cdd7016

Browse files
Merge pull request #203 from ibuildthecloud/main
bug: send non-standard name field for Azure
2 parents 6c26410 + e830f69 commit cdd7016

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/gptscript-ai/gptscript
22

33
go 1.22.0
44

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

77
require (
88
github.com/AlecAivazis/survey/v2 v2.3.7

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
124124
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
125125
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
126126
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
127-
github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457 h1:ziAtY3K9pxk4Ua/0dQdndAopXyLlzguX9ECRbi8E9t4=
128-
github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
127+
github.com/gptscript-ai/go-openai v0.0.0-20240330064700-d33320ca826f h1:XSqwZIal7wCjmkV3Ncrvu5TAvXlaUnjGwygn21OTlh0=
128+
github.com/gptscript-ai/go-openai v0.0.0-20240330064700-d33320ca826f/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
129129
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
130130
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
131131
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=

pkg/openai/client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ func toMessages(request types.CompletionRequest) (result []openai.ChatCompletion
263263

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

268270
for _, content := range message.Content {

0 commit comments

Comments
 (0)