Partager via


OpenAIClientBuilder Classe

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

Implémente

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

Générateur pour la création d’un instance du type OpenAIClient.

Récapitulatif du constructeur

Constructeur Description
OpenAIClientBuilder()

Créez un instance d’OpenAIClientBuilder.

Résumé de la méthode

Modificateur et type Méthode et description
OpenAIClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

.

OpenAIAsyncClient buildAsyncClient()

Génère un instance de laclasse Open AIAsyncClient.

OpenAIClient buildClient()

Génère une instance de la classe 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)

Définit la stratégie de nouvelle tentative qui tentera de réessayer les demandes ayant échoué, le cas échéant.

OpenAIClientBuilder serviceVersion(OpenAIServiceVersion serviceVersion)

Définit la version du service.

Méthodes héritées de java.lang.Object

Détails du constructeur

OpenAIClientBuilder

public OpenAIClientBuilder()

Créez un instance d’OpenAIClientBuilder.

Détails de la méthode

addPolicy

public OpenAIClientBuilder addPolicy(HttpPipelinePolicy customPolicy)

.

Parameters:

customPolicy

buildAsyncClient

public OpenAIAsyncClient buildAsyncClient()

Génère un instance de la classe OpenAIAsyncClient.

Returns:

instance d’OpenAIAsyncClient.

buildClient

public OpenAIClient buildClient()

Génère une instance de classe OpenAIClient.

Returns:

instance d’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)

Définit la stratégie de nouvelle tentative qui tentera de réessayer les demandes ayant échoué, le cas échéant.

Parameters:

retryPolicy - valeur retryPolicy.

Returns:

OpenAIClientBuilder.

serviceVersion

public OpenAIClientBuilder serviceVersion(OpenAIServiceVersion serviceVersion)

Définit la version du service.

Parameters:

serviceVersion - valeur serviceVersion.

Returns:

OpenAIClientBuilder.

S’applique à