Skip to content

Commit

Permalink
replace deprecated FunctionDefine in chat_test.go (sashabaranov#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryomak authored Jun 29, 2023
1 parent 86d0f48 commit 9c99f36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestChatCompletionsFunctions(t *testing.T) {
Content: "Hello!",
},
},
Functions: []FunctionDefine{{
Functions: []FunctionDefinition{{
Name: "test",
Parameters: &msg,
}},
Expand Down Expand Up @@ -117,7 +117,7 @@ func TestChatCompletionsFunctions(t *testing.T) {
})
checks.NoError(t, err, "CreateChatCompletion with functions error")
})
t.Run("JSONSchemaDefine", func(t *testing.T) {
t.Run("JSONSchemaDefinition", func(t *testing.T) {
_, err := client.CreateChatCompletion(context.Background(), ChatCompletionRequest{
MaxTokens: 5,
Model: GPT3Dot5Turbo0613,
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestChatCompletionsFunctions(t *testing.T) {
})
checks.NoError(t, err, "CreateChatCompletion with functions error")
})
t.Run("JSONSchemaDefineWithFunctionDefine", func(t *testing.T) {
t.Run("JSONSchemaDefinitionWithFunctionDefine", func(t *testing.T) {
// this is a compatibility check
_, err := client.CreateChatCompletion(context.Background(), ChatCompletionRequest{
MaxTokens: 5,
Expand Down

0 comments on commit 9c99f36

Please sign in to comment.