Package org.springframework.ai.openai
Class AbstractOpenAiOptions.AbstractBuilder<O extends AbstractOpenAiOptions,B extends AbstractOpenAiOptions.AbstractBuilder<O,B>>
java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions.AbstractBuilder<O,B>
- Direct Known Subclasses:
OpenAiAudioSpeechOptions.Builder,OpenAiAudioTranscriptionOptions.Builder,OpenAiEmbeddingOptions.Builder,OpenAiImageOptions.Builder,OpenAiModerationOptions.Builder
- Enclosing class:
- AbstractOpenAiOptions
protected abstract static class AbstractOpenAiOptions.AbstractBuilder<O extends AbstractOpenAiOptions,B extends AbstractOpenAiOptions.AbstractBuilder<O,B>>
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable Stringprotected @Nullable Stringprotected @Nullable com.openai.credential.Credentialprotected @Nullable Booleanprotected @Nullable Booleanprotected @Nullable Integerprotected @Nullable Stringprotected @Nullable com.openai.azure.AzureOpenAIServiceVersionprotected @Nullable Stringprotected @Nullable Stringprotected @Nullable Proxyprotected @Nullable Duration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the API key using anApiKeyinstance.azureOpenAIServiceVersion(@Nullable com.openai.azure.AzureOpenAIServiceVersion azureOpenAIServiceVersion) abstract Obuild()credential(@Nullable com.openai.credential.Credential credential) customHeaders(@Nullable Map<String, String> customHeaders) deploymentName(@Nullable String deploymentName) gitHubModels(@Nullable Boolean gitHubModels) maxRetries(@Nullable Integer maxRetries) microsoftFoundry(@Nullable Boolean microsoftFoundry) microsoftFoundryServiceVersion(@Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion) organizationId(@Nullable String organizationId) protected Bself()
-
Field Details
-
baseUrl
-
apiKey
-
credential
protected @Nullable com.openai.credential.Credential credential -
model
-
microsoftDeploymentName
-
microsoftFoundryServiceVersion
protected @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion -
organizationId
-
isMicrosoftFoundry
-
isGitHubModels
-
timeout
-
maxRetries
-
proxy
-
customHeaders
-
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder()
-
-
Method Details
-
self
-
baseUrl
-
apiKey
-
apiKey
Sets the API key using anApiKeyinstance. Pass aNoopApiKeyto disable authentication (noAuthorizationheader will be sent), which is the same behavior as setting an empty string viaapiKey(String).- Parameters:
apiKey- the API key instance; ifnull, the key is cleared
-
credential
-
model
-
deploymentName
-
microsoftFoundryServiceVersion
public B microsoftFoundryServiceVersion(@Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion) -
azureOpenAIServiceVersion
public B azureOpenAIServiceVersion(@Nullable com.openai.azure.AzureOpenAIServiceVersion azureOpenAIServiceVersion) -
organizationId
-
microsoftFoundry
-
azure
-
gitHubModels
-
timeout
-
maxRetries
-
proxy
-
customHeaders
-
build
-