Class AbstractOpenAiOptions

java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
Direct Known Subclasses:
OpenAiAudioSpeechOptions, OpenAiAudioTranscriptionOptions, OpenAiEmbeddingOptions, OpenAiImageOptions, OpenAiModerationOptions

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

      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

      public @Nullable String getBaseUrl()
    • getApiKey

      public @Nullable String getApiKey()
    • getCredential

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

      public @Nullable String getModel()
    • getMicrosoftDeploymentName

      public @Nullable String getMicrosoftDeploymentName()
    • getDeploymentName

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

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

      public @Nullable String getOrganizationId()
    • isMicrosoftFoundry

      public boolean isMicrosoftFoundry()
    • isGitHubModels

      public boolean isGitHubModels()
    • getTimeout

      public Duration getTimeout()
    • getMaxRetries

      public int getMaxRetries()
    • getProxy

      public @Nullable Proxy getProxy()
    • getCustomHeaders

      public @Nullable Map<String,String> getCustomHeaders()