Package io.github.sashirestela.openai
Class SimpleOpenAIAzure
- java.lang.Object
-
- io.github.sashirestela.openai.base.OpenAIProvider
-
- io.github.sashirestela.openai.SimpleOpenAIAzure
-
- All Implemented Interfaces:
ChatCompletionServices
,FileServices
public class SimpleOpenAIAzure extends OpenAIProvider implements ChatCompletionServices, FileServices
The Azure OpenAI implementation which implements a subset of the standard services.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
SimpleOpenAIAzure.AzureConfigurator
-
Field Summary
-
Fields inherited from class io.github.sashirestela.openai.base.OpenAIProvider
cleverClient, realtime
-
-
Constructor Summary
Constructors Constructor Description SimpleOpenAIAzure(@NonNull String apiKey, @NonNull String baseUrl, @NonNull String apiVersion, HttpClient httpClient, io.github.sashirestela.cleverclient.client.HttpClientAdapter clientAdapter, io.github.sashirestela.cleverclient.retry.RetryConfig retryConfig, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Constructor used to generate a builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenAI.ChatCompletions
chatCompletions()
OpenAI.Files
files()
-
Methods inherited from class io.github.sashirestela.openai.base.OpenAIProvider
getOrCreateService, shutDown
-
-
-
-
Constructor Detail
-
SimpleOpenAIAzure
public SimpleOpenAIAzure(@NonNull @NonNull String apiKey, @NonNull @NonNull String baseUrl, @NonNull @NonNull String apiVersion, HttpClient httpClient, io.github.sashirestela.cleverclient.client.HttpClientAdapter clientAdapter, io.github.sashirestela.cleverclient.retry.RetryConfig retryConfig, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Constructor used to generate a builder.- Parameters:
apiKey
- Identifier to be used for authentication. Mandatory.baseUrl
- The URL of the Azure OpenAI deployment. Mandatory.apiVersion
- Azure OpenAI API version. See: Azure OpenAI API versioning. Mandatory.httpClient
- AHttpClient
object. One is created by default if not provided. Optional. Deprecated in favor of clientAdapter.clientAdapter
- Component to make http services. If none is passed the JavaHttpClientAdapter will be used. Optional.retryConfig
- Configuration for request retrying. If not provided, default values will be used. Optional.objectMapper
- Provides Json conversions either to and from objects. Optional.
-
-
Method Detail
-
chatCompletions
public OpenAI.ChatCompletions chatCompletions()
- Specified by:
chatCompletions
in interfaceChatCompletionServices
-
files
public OpenAI.Files files()
- Specified by:
files
in interfaceFileServices
-
-