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

public class AbstractOpenAiOptions extends Object
  • Field Details

    • DEFAULT_TIMEOUT

      public static final Duration DEFAULT_TIMEOUT
      Default request timeout for the OpenAI client.
    • DEFAULT_MAX_RETRIES

      public static final int DEFAULT_MAX_RETRIES
      Default maximum number of retries for the OpenAI client.
      See Also:
  • Constructor Details

    • AbstractOpenAiOptions

      public AbstractOpenAiOptions()
  • Method Details

    • getBaseUrl

      public @Nullable String getBaseUrl()
    • setBaseUrl

      public void setBaseUrl(@Nullable String baseUrl)
    • getApiKey

      public @Nullable String getApiKey()
    • setApiKey

      public void setApiKey(@Nullable String apiKey)
    • getCredential

      public @Nullable com.openai.credential.Credential getCredential()
    • setCredential

      public void setCredential(@Nullable com.openai.credential.Credential credential)
    • getModel

      public @Nullable String getModel()
    • setModel

      public void setModel(@Nullable String model)
    • getMicrosoftDeploymentName

      public @Nullable String getMicrosoftDeploymentName()
    • setMicrosoftDeploymentName

      public void setMicrosoftDeploymentName(@Nullable String microsoftDeploymentName)
    • getDeploymentName

      public @Nullable String getDeploymentName()
      Alias for getAzureDeploymentName()
    • setDeploymentName

      public void setDeploymentName(@Nullable String azureDeploymentName)
      Alias for setAzureDeploymentName()
    • getMicrosoftFoundryServiceVersion

      public @Nullable com.openai.azure.AzureOpenAIServiceVersion getMicrosoftFoundryServiceVersion()
    • setMicrosoftFoundryServiceVersion

      public void setMicrosoftFoundryServiceVersion(@Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion)
    • getOrganizationId

      public @Nullable String getOrganizationId()
    • setOrganizationId

      public void setOrganizationId(@Nullable String organizationId)
    • isMicrosoftFoundry

      public boolean isMicrosoftFoundry()
    • setMicrosoftFoundry

      public void setMicrosoftFoundry(boolean microsoftFoundry)
    • isGitHubModels

      public boolean isGitHubModels()
    • setGitHubModels

      public void setGitHubModels(boolean gitHubModels)
    • getTimeout

      public Duration getTimeout()
    • setTimeout

      public void setTimeout(Duration timeout)
    • getMaxRetries

      public int getMaxRetries()
    • setMaxRetries

      public void setMaxRetries(int maxRetries)
    • getProxy

      public @Nullable Proxy getProxy()
    • setProxy

      public void setProxy(@Nullable Proxy proxy)
    • getCustomHeaders

      public Map<String,String> getCustomHeaders()
    • setCustomHeaders

      public void setCustomHeaders(Map<String,String> customHeaders)