Compartir a través de


OpenAIClientBuilder Clase

  • java.lang.Object
    • com.azure.ai.openai.OpenAIClientBuilder

Implementaciones

public final class OpenAIClientBuilder
implements HttpTrait<OpenAIClientBuilder>, ConfigurationTrait<OpenAIClientBuilder>, TokenCredentialTrait<OpenAIClientBuilder>, com.azure.core.client.traits.KeyCredentialTrait<OpenAIClientBuilder>, EndpointTrait<OpenAIClientBuilder>

Generador para crear una nueva instancia del tipo OpenAIClient.

Resumen del constructor

Constructor Description
OpenAIClientBuilder()

Cree una instancia de OpenAIClientBuilder.

Resumen del método

Modificador y tipo Método y descripción
OpenAIClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

.

OpenAIAsyncClient buildAsyncClient()

Compila una instancia de la clase cliente OpenAIAsync.

OpenAIClient buildClient()

Crea una instancia de la clase OpenAIClient.

OpenAIClientBuilder clientOptions(ClientOptions clientOptions)

.

OpenAIClientBuilder configuration(Configuration configuration)

.

OpenAIClientBuilder credential(KeyCredential keyCredential)

.

OpenAIClientBuilder credential(TokenCredential tokenCredential)

.

OpenAIClientBuilder endpoint(String endpoint)

.

OpenAIClientBuilder httpClient(HttpClient httpClient)

.

OpenAIClientBuilder httpLogOptions(HttpLogOptions httpLogOptions)

.

OpenAIClientBuilder pipeline(HttpPipeline pipeline)

.

OpenAIClientBuilder retryOptions(RetryOptions retryOptions)

.

OpenAIClientBuilder retryPolicy(RetryPolicy retryPolicy)

Establece la directiva de reintento que intentará reintentar solicitudes con error, si procede.

OpenAIClientBuilder serviceVersion(OpenAIServiceVersion serviceVersion)

Establece la versión del servicio.

Métodos heredados de java.lang.Object

Detalles del constructor

OpenAIClientBuilder

public OpenAIClientBuilder()

Cree una instancia de OpenAIClientBuilder.

Detalles del método

addPolicy

public OpenAIClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

.

Parameters:

customPolicy

buildAsyncClient

public OpenAIAsyncClient buildAsyncClient()

Compila una instancia de la clase OpenAIAsyncClient.

Returns:

una instancia de OpenAIAsyncClient.

buildClient

public OpenAIClient buildClient()

Compila una instancia de la clase OpenAIClient.

Returns:

una instancia de OpenAIClient.

clientOptions

public OpenAIClientBuilder clientOptions(ClientOptions clientOptions)

.

Parameters:

clientOptions

configuration

public OpenAIClientBuilder configuration(Configuration configuration)

.

Parameters:

configuration

credential

public OpenAIClientBuilder credential(KeyCredential keyCredential)

.

Parameters:

keyCredential

credential

public OpenAIClientBuilder credential(TokenCredential tokenCredential)

.

Parameters:

tokenCredential

endpoint

public OpenAIClientBuilder endpoint(String endpoint)

.

Parameters:

endpoint

httpClient

public OpenAIClientBuilder httpClient(HttpClient httpClient)

.

Parameters:

httpClient

httpLogOptions

public OpenAIClientBuilder httpLogOptions(HttpLogOptions httpLogOptions)

.

Parameters:

httpLogOptions

pipeline

public OpenAIClientBuilder pipeline(HttpPipeline pipeline)

.

Parameters:

pipeline

retryOptions

public OpenAIClientBuilder retryOptions(RetryOptions retryOptions)

.

Parameters:

retryOptions

retryPolicy

public OpenAIClientBuilder retryPolicy(RetryPolicy retryPolicy)

Establece la directiva de reintento que intentará reintentar solicitudes con error, si procede.

Parameters:

retryPolicy - valor retryPolicy.

Returns:

OpenAIClientBuilder.

serviceVersion

public OpenAIClientBuilder serviceVersion(OpenAIServiceVersion serviceVersion)

Establece la versión del servicio.

Parameters:

serviceVersion - valor serviceVersion.

Returns:

OpenAIClientBuilder.

Se aplica a