diff --git a/sdk/cognitiveservices/azopenai/CHANGELOG.md b/sdk/cognitiveservices/azopenai/CHANGELOG.md index c00ce1cf1381..0c0dbdbd03fc 100644 --- a/sdk/cognitiveservices/azopenai/CHANGELOG.md +++ b/sdk/cognitiveservices/azopenai/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 0.1.0 (unreleased) +## 0.1.0 (2023-07-19) * Initial release of the `azopenai` library diff --git a/sdk/cognitiveservices/azopenai/example_client_getchatcompletions_test.go b/sdk/cognitiveservices/azopenai/example_client_getchatcompletions_test.go index 007338d78547..c531f2609c00 100644 --- a/sdk/cognitiveservices/azopenai/example_client_getchatcompletions_test.go +++ b/sdk/cognitiveservices/azopenai/example_client_getchatcompletions_test.go @@ -109,13 +109,6 @@ func ExampleClient_GetChatCompletions_functions() { // TODO: handle error } - // some JSON schema keys - const jsonSchemaType = "type" - const jsonSchemaDesc = "description" - const jsonSchemaEnum = "enum" - const jsonSchemaRequired = "required" - const jsonSchemaProps = "properties" - resp, err := client.GetChatCompletions(context.Background(), azopenai.ChatCompletionsOptions{ Model: &modelDeploymentID, Messages: []azopenai.ChatMessage{ @@ -133,16 +126,16 @@ func ExampleClient_GetChatCompletions_functions() { Description: to.Ptr("Get the current weather in a given location"), Parameters: map[string]any{ - jsonSchemaRequired: []string{"location"}, - jsonSchemaType: "object", - jsonSchemaProps: map[string]any{ + "required": []string{"location"}, + "type": "object", + "properties": map[string]any{ "location": map[string]any{ - jsonSchemaType: "string", - jsonSchemaDesc: "The city and state, e.g. San Francisco, CA", + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", }, "unit": map[string]any{ - jsonSchemaType: "string", - jsonSchemaEnum: []string{"celsius", "fahrenheit"}, + "type": "string", + "enum": []string{"celsius", "fahrenheit"}, }, }, },