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 Summary
Constructor | Description |
---|---|
OpenAIClientBuilder() |
Create an instance of the Open |
Method Summary
Methods inherited from java.lang.Object
Constructor Details
OpenAIClientBuilder
public OpenAIClientBuilder()
Create an instance of the OpenAIClientBuilder.
Method Details
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: