Skip to content

Commit 5df73f9

Browse files
authored
[azopenai]: Update custom_client.go to enable insecure credential with HTTP (#23188)
Update custom_client.go to enable insecure credential with HTTP
1 parent b4b4721 commit 5df73f9

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

sdk/ai/azopenai/CHANGELOG.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Bugs Fixed
1010

11+
- Ai sdk custom_client now respects `InsecureAllowCredentialWithHTTP` flag for allowing insecure connections. (PR#23188)
12+
1113
### Other Changes
1214

1315
## 0.6.0 (2024-06-11)
@@ -18,7 +20,7 @@
1820

1921
### Breaking Changes
2022

21-
- ContentFilterResultDetailsForPrompt.CustomBlocklists has been changed from a []ContentFilterBlocklistIDResult to a struct,
23+
- ContentFilterResultDetailsForPrompt.CustomBlocklists has been changed from a []ContentFilterBlocklistIDResult to a struct,
2224
containing the slice of []ContentFilterBlocklistIDResult.
2325
- OnYourDataEndpointVectorizationSource.Authentication's type has changed to OnYourDataVectorSearchAuthenticationOptionsClassification
2426
- Casing has been corrected for fields:
@@ -34,7 +36,7 @@
3436

3537
### Features Added
3638

37-
- Updating to the `2024-03-01-preview` API version. This adds support for using Dimensions with Embeddings as well as the ability to choose the embeddings format.
39+
- Updating to the `2024-03-01-preview` API version. This adds support for using Dimensions with Embeddings as well as the ability to choose the embeddings format.
3840
This update also adds in the `Model` field for ChatCompletions responses. PR(#22603)
3941

4042
## 0.5.0 (2024-03-05)
@@ -54,8 +56,8 @@
5456

5557
### Bugs Fixed
5658

57-
- `AudioTranscriptionOptions.Filename` and `AudioTranslationOptions.Filename` fields are now properly propagated, allowing
58-
for disambiguating the format of an audio file when OpenAI can't detect it. (PR#22210)
59+
- `AudioTranscriptionOptions.Filename` and `AudioTranslationOptions.Filename` fields are now properly propagated, allowing
60+
for disambiguating the format of an audio file when OpenAI can't detect it. (PR#22210)
5961

6062
## 0.4.0 (2023-12-11)
6163

@@ -82,9 +84,11 @@ Support for many of the features mentioned in OpenAI's November Dev Day and Micr
8284
## 0.3.0 (2023-09-26)
8385

8486
### Features Added
87+
8588
- Support for Whisper audio APIs for transcription and translation using `GetAudioTranscription` and `GetAudioTranslation`.
8689

8790
### Breaking Changes
91+
8892
- ChatChoiceContentFilterResults content filtering fields are now all typed as ContentFilterResult, instead of unique types for each field.
8993
- `PromptAnnotations` renamed to `PromptFilterResults` in `ChatCompletions` and `Completions`.
9094

@@ -102,7 +106,7 @@ Support for many of the features mentioned in OpenAI's November Dev Day and Micr
102106

103107
### Bugs Fixed
104108

105-
- EventReader, used by GetChatCompletionsStream and GetCompletionsStream for streaming results, would not return an
109+
- EventReader, used by GetChatCompletionsStream and GetCompletionsStream for streaming results, would not return an
106110
error if the underlying Body reader was closed or EOF'd before the actual DONE: token arrived. This could result in an
107111
infinite loop for callers. (PR#21323)
108112

@@ -114,4 +118,4 @@ Support for many of the features mentioned in OpenAI's November Dev Day and Micr
114118

115119
## 0.1.0 (2023-07-20)
116120

117-
* Initial release of the `azopenai` library
121+
- Initial release of the `azopenai` library

sdk/ai/azopenai/custom_client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ func NewClientForOpenAI(endpoint string, credential *azcore.KeyCredential, optio
9494
}
9595

9696
kp := runtime.NewKeyCredentialPolicy(credential, "authorization", &runtime.KeyCredentialPolicyOptions{
97-
Prefix: "Bearer ",
97+
Prefix: "Bearer ",
98+
InsecureAllowCredentialWithHTTP: options.InsecureAllowCredentialWithHTTP,
9899
})
99100

100101
azcoreClient, err := azcore.NewClient(clientName, version, runtime.PipelineOptions{

0 commit comments

Comments
 (0)