Class OpenAiAudioTranscriptionOptions

java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
org.springframework.ai.openai.OpenAiAudioTranscriptionOptions
All Implemented Interfaces:
AudioTranscriptionOptions, ModelOptions

public class OpenAiAudioTranscriptionOptions extends AbstractOpenAiOptions implements AudioTranscriptionOptions
OpenAI SDK Audio Transcription Options.
Author:
Michael Lavelle, Christian Tzolov, Piotr Olaszewski, Ilayaperumal Gopinathan
  • Field Details

    • DEFAULT_TRANSCRIPTION_MODEL

      public static final String DEFAULT_TRANSCRIPTION_MODEL
      Default transcription model (Whisper 1).
    • DEFAULT_RESPONSE_FORMAT

      public static final com.openai.models.audio.AudioResponseFormat DEFAULT_RESPONSE_FORMAT
      Default response format.
  • Constructor Details

    • OpenAiAudioTranscriptionOptions

      protected OpenAiAudioTranscriptionOptions(@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, @Nullable com.openai.models.audio.AudioResponseFormat responseFormat, @Nullable String prompt, @Nullable String language, @Nullable Float temperature, @Nullable List<com.openai.models.audio.transcriptions.TranscriptionCreateParams.TimestampGranularity> timestampGranularities)
  • Method Details

    • builder

      public static OpenAiAudioTranscriptionOptions.Builder builder()
    • getModel

      public String getModel()
      Specified by:
      getModel in interface AudioTranscriptionOptions
      Overrides:
      getModel in class AbstractOpenAiOptions
    • getResponseFormat

      public com.openai.models.audio.AudioResponseFormat getResponseFormat()
    • getPrompt

      public @Nullable String getPrompt()
    • getLanguage

      public @Nullable String getLanguage()
    • getTemperature

      public @Nullable Float getTemperature()
    • getTimestampGranularities

      public @Nullable List<com.openai.models.audio.transcriptions.TranscriptionCreateParams.TimestampGranularity> getTimestampGranularities()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object