-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the bug
The interface com.azure.ai.openai.OpenAIAsyncClient#getImageGenerationsWithResponse(java.lang.String, com.azure.core.util.BinaryData, com.azure.core.http.rest.RequestOptions)
currently uses the default visibility, which is protected.
Lines 1524 to 1530 in 7adf7f6
Mono<Response<BinaryData>> getImageGenerationsWithResponse(String deploymentOrModelName, | |
BinaryData imageGenerationOptions, RequestOptions requestOptions) { | |
return this.openAIServiceClient != null | |
? this.openAIServiceClient.getImageGenerationsWithResponseAsync(deploymentOrModelName, | |
imageGenerationOptions, requestOptions) | |
: this.serviceClient.getImageGenerationsWithResponseAsync(deploymentOrModelName, imageGenerationOptions, | |
requestOptions); |
I believe it should be public
, as this is inconsistent with other similar interfaces, such as:
com.azure.ai.openai.OpenAIClient#getChatCompletionsWithResponse(java.lang.String, com.azure.core.util.BinaryData, com.azure.core.http.rest.RequestOptions)
:
azure-sdk-for-java/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java
Lines 345 to 352 in 7adf7f6
public Response<BinaryData> getChatCompletionsWithResponse(String deploymentOrModelName, | |
BinaryData chatCompletionsOptions, RequestOptions requestOptions) { | |
return openAIServiceClient != null | |
? openAIServiceClient.getChatCompletionsWithResponse(deploymentOrModelName, chatCompletionsOptions, | |
requestOptions) | |
: serviceClient.getChatCompletionsWithResponse(deploymentOrModelName, chatCompletionsOptions, | |
requestOptions); | |
} |
com.azure.ai.openai.OpenAIClient#getEmbeddingsWithResponse(java.lang.String, com.azure.core.util.BinaryData, com.azure.core.http.rest.RequestOptions)
:
azure-sdk-for-java/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java
Lines 162 to 169 in 7adf7f6
public Response<BinaryData> getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData embeddingsOptions, | |
RequestOptions requestOptions) { | |
final BinaryData embeddingsOptionsUpdated = addEncodingFormat(embeddingsOptions); | |
return openAIServiceClient != null | |
? openAIServiceClient.getEmbeddingsWithResponse(deploymentOrModelName, embeddingsOptionsUpdated, | |
requestOptions) | |
: serviceClient.getEmbeddingsWithResponse(deploymentOrModelName, embeddingsOptionsUpdated, requestOptions); | |
} |
and com.azure.ai.openai.OpenAIClient#getAudioTranscriptionWithResponse
:
azure-sdk-for-java/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java
Lines 948 to 953 in 7adf7f6
public Response<AudioTranscription> getAudioTranscriptionWithResponse(String deploymentOrModelName, String fileName, | |
AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions) { | |
// checking allowed formats for a JSON response | |
validateAudioResponseFormatForTranscription(audioTranscriptionOptions); | |
// embedding the `model` in the request for non-Azure case | |
if (this.openAIServiceClient != null) { |