Package org.springframework.ai.openai
Class AbstractOpenAiOptions
java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
- Direct Known Subclasses:
OpenAiAudioSpeechOptions,OpenAiAudioSpeechProperties,OpenAiAudioTranscriptionOptions,OpenAiAudioTranscriptionProperties,OpenAiAutoConfigurationUtil.ResolvedConnectionProperties,OpenAiChatOptions,OpenAiChatProperties,OpenAiConnectionProperties,OpenAiEmbeddingOptions,OpenAiEmbeddingProperties,OpenAiImageOptions,OpenAiImageProperties,OpenAiModerationOptions,OpenAiModerationProperties
-
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
Constructors -
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()booleanbooleanvoidvoidsetBaseUrl(@Nullable String baseUrl) voidsetCredential(@Nullable com.openai.credential.Credential credential) voidsetCustomHeaders(Map<String, String> customHeaders) voidsetDeploymentName(@Nullable String azureDeploymentName) Alias for setAzureDeploymentName()voidsetGitHubModels(boolean gitHubModels) voidsetMaxRetries(int maxRetries) voidsetMicrosoftDeploymentName(@Nullable String microsoftDeploymentName) voidsetMicrosoftFoundry(boolean microsoftFoundry) voidsetMicrosoftFoundryServiceVersion(@Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion) voidvoidsetOrganizationId(@Nullable String organizationId) voidvoidsetTimeout(Duration timeout)
-
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
public AbstractOpenAiOptions()
-
-
Method Details
-
getBaseUrl
-
setBaseUrl
-
getApiKey
-
setApiKey
-
getCredential
public @Nullable com.openai.credential.Credential getCredential() -
setCredential
public void setCredential(@Nullable com.openai.credential.Credential credential) -
getModel
-
setModel
-
getMicrosoftDeploymentName
-
setMicrosoftDeploymentName
-
getDeploymentName
Alias for getAzureDeploymentName() -
setDeploymentName
Alias for setAzureDeploymentName() -
getMicrosoftFoundryServiceVersion
public @Nullable com.openai.azure.AzureOpenAIServiceVersion getMicrosoftFoundryServiceVersion() -
setMicrosoftFoundryServiceVersion
public void setMicrosoftFoundryServiceVersion(@Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion) -
getOrganizationId
-
setOrganizationId
-
isMicrosoftFoundry
public boolean isMicrosoftFoundry() -
setMicrosoftFoundry
public void setMicrosoftFoundry(boolean microsoftFoundry) -
isGitHubModels
public boolean isGitHubModels() -
setGitHubModels
public void setGitHubModels(boolean gitHubModels) -
getTimeout
-
setTimeout
-
getMaxRetries
public int getMaxRetries() -
setMaxRetries
public void setMaxRetries(int maxRetries) -
getProxy
-
setProxy
-
getCustomHeaders
-
setCustomHeaders
-