OpenAIClientBuilder Class
- java.
lang. Object - com.
azure. ai. openai. OpenAIClientBuilder
- com.
Implements
public final class OpenAIClientBuilder
implements HttpTrait<OpenAIClientBuilder>, ConfigurationTrait<OpenAIClientBuilder>, TokenCredentialTrait<OpenAIClientBuilder>, KeyCredentialTrait<OpenAIClientBuilder>, EndpointTrait<OpenAIClientBuilder>
A builder for creating a new instance of the OpenAIClient type.
Constructor | Description |
---|---|
Open |
Create an instance of the Open |
Methods inherited from java.lang.Object
OpenAIClientBuilder
public OpenAIClientBuilder()
Create an instance of the OpenAIClientBuilder.
addPolicy
public OpenAIClientBuilder addPolicy(HttpPipelinePolicy customPolicy)
.
Parameters:
buildAsyncClient
public OpenAIAsyncClient buildAsyncClient()
Builds an instance of OpenAIAsyncClient class.
Returns:
buildClient
public OpenAIClient buildClient()
Builds an instance of OpenAIClient class.
Returns:
clientOptions
public OpenAIClientBuilder clientOptions(ClientOptions clientOptions)
.
Parameters:
configuration
public OpenAIClientBuilder configuration(Configuration configuration)
.
Parameters:
credential
public OpenAIClientBuilder credential(KeyCredential keyCredential)
.
Parameters:
credential
public OpenAIClientBuilder credential(TokenCredential tokenCredential)
.
Parameters:
endpoint
public OpenAIClientBuilder endpoint(String endpoint)
.
Parameters:
httpClient
public OpenAIClientBuilder httpClient(HttpClient httpClient)
.
Parameters:
httpLogOptions
public OpenAIClientBuilder httpLogOptions(HttpLogOptions httpLogOptions)
.
Parameters:
pipeline
public OpenAIClientBuilder pipeline(HttpPipeline pipeline)
.
Parameters:
retryOptions
public OpenAIClientBuilder retryOptions(RetryOptions retryOptions)
.
Parameters:
retryPolicy
public OpenAIClientBuilder retryPolicy(RetryPolicy retryPolicy)
Sets The retry policy that will attempt to retry failed requests, if applicable.
Parameters:
Returns:
serviceVersion
public OpenAIClientBuilder serviceVersion(OpenAIServiceVersion serviceVersion)
Sets Service version.
Parameters:
Returns:
Azure SDK for Java feedback
Azure SDK for Java is an open source project. Select a link to provide feedback: