Skip to content

Commit

Permalink
[OpenAI] Modes required to be public in Java SDK (#26651)
Browse files Browse the repository at this point in the history
  • Loading branch information
mssfang authored Nov 13, 2023
1 parent 6013319 commit 8178614
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions specification/cognitiveservices/OpenAI.Inference/client.tsp
Original file line number Diff line number Diff line change
@@ -17,11 +17,30 @@ using Azure.ClientGenerator.Core;

// Some models from routes with suppressed visibility are still desired for custom public surface.
@@access(Azure.OpenAI.ImageGenerationOptions, Access.public);
@@usage(Azure.OpenAI.ImageGenerationOptions, Usage.input | Usage.output);
@@access(Azure.OpenAI.ImageLocation, Access.public);
@@access(Azure.OpenAI.ImageGenerations, Access.public, "csharp");
@@access(Azure.OpenAI.ImageGenerations, Access.public, "python");
@@access(Azure.OpenAI.ImageGenerations, Access.public, "javascript");
@@usage(Azure.OpenAI.ImageLocation, Usage.input | Usage.output);
@@access(Azure.OpenAI.ImageSize, Access.public);
@@usage(Azure.OpenAI.ImageGenerations, Usage.input | Usage.output);

// Java will need to have those models expose in public surface.
@@access(Azure.OpenAI.AudioTaskLabel, Access.public, "java");
@@access(Azure.OpenAI.AudioTranscription, Access.public, "java");
@@access(Azure.OpenAI.AudioTranscriptionSegment, Access.public, "java");
@@access(Azure.OpenAI.AudioTranslation, Access.public, "java");
@@access(Azure.OpenAI.AudioTranslationSegment, Access.public, "java");
@@access(Azure.OpenAI.AzureChatExtensionConfiguration, Access.public, "java");
@@access(Azure.OpenAI.AzureChatExtensionType, Access.public, "java");
@@access(Azure.OpenAI.AzureOpenAIOperationState, Access.public, "java");
@@access(Azure.OpenAI.ChatChoice, Access.public, "java");
@@access(Azure.OpenAI.ChatCompletions, Access.public, "java");
// Error: Model 'ChatCompletionsOptions' cannot be set as access=public, as it refers Union 'FunctionCallPreset | FunctionName'
// @@access(Azure.OpenAI.ChatCompletionsOptions, Access.public, "java");
@@access(Azure.OpenAI.ChatMessage, Access.public, "java");
@@access(Azure.OpenAI.ChatRole, Access.public, "java");
@@access(Azure.OpenAI.FunctionCall, Access.public, "java");
@@access(Azure.OpenAI.FunctionDefinition, Access.public, "java");
@@access(Azure.OpenAI.FunctionName, Access.public, "java");

@@access(Azure.OpenAI.AzureCognitiveSearchIndexFieldMappingOptions,
Access.public

0 comments on commit 8178614

Please sign in to comment.