Package org.springframework.ai.openai
Class AbstractOpenAiOptions
java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
- Direct Known Subclasses:
OpenAiAudioSpeechOptions,OpenAiAudioTranscriptionOptions,OpenAiEmbeddingOptions,OpenAiImageOptions,OpenAiModerationOptions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAbstractOpenAiOptions.AbstractBuilder<O extends AbstractOpenAiOptions,B extends AbstractOpenAiOptions.AbstractBuilder<O, B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault maximum number of retries for the OpenAI client.static final DurationDefault request timeout for the OpenAI client. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOpenAiOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders) -
Method Summary
Modifier and TypeMethodDescription@Nullable String@Nullable String@Nullable com.openai.credential.Credential@Nullable StringAlias for getAzureDeploymentName()int@Nullable String@Nullable com.openai.azure.AzureOpenAIServiceVersion@Nullable StringgetModel()@Nullable String@Nullable ProxygetProxy()booleanboolean
-
Field Details
-
DEFAULT_TIMEOUT
Default request timeout for the OpenAI client. -
DEFAULT_MAX_RETRIES
public static final int DEFAULT_MAX_RETRIESDefault maximum number of retries for the OpenAI client.- See Also:
-
-
Constructor Details
-
AbstractOpenAiOptions
protected AbstractOpenAiOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders)
-
-
Method Details
-
getBaseUrl
-
getApiKey
-
getCredential
public @Nullable com.openai.credential.Credential getCredential() -
getModel
-
getMicrosoftDeploymentName
-
getDeploymentName
Alias for getAzureDeploymentName() -
getMicrosoftFoundryServiceVersion
public @Nullable com.openai.azure.AzureOpenAIServiceVersion getMicrosoftFoundryServiceVersion() -
getOrganizationId
-
isMicrosoftFoundry
public boolean isMicrosoftFoundry() -
isGitHubModels
public boolean isGitHubModels() -
getTimeout
-
getMaxRetries
public int getMaxRetries() -
getProxy
-
getCustomHeaders
-