Package org.springframework.ai.openai
Class OpenAiAudioTranscriptionModel
java.lang.Object
org.springframework.ai.openai.OpenAiAudioTranscriptionModel
- All Implemented Interfaces:
Model<AudioTranscriptionPrompt,
AudioTranscriptionResponse>
public class OpenAiAudioTranscriptionModel
extends Object
implements Model<AudioTranscriptionPrompt,AudioTranscriptionResponse>
OpenAI audio transcription client implementation for backed by
OpenAiAudioApi
.
You provide as input the audio file you want to transcribe and the desired output file
format of the transcription of the audio.- Since:
- 0.8.1
- Author:
- Michael Lavelle, Christian Tzolov, Thomas Vitale
- See Also:
-
Constructor Summary
ConstructorDescriptionOpenAiAudioTranscriptionModel
(OpenAiAudioApi audioApi) OpenAiAudioTranscriptionModel is a client class used to interact with the OpenAI Audio Transcription API.OpenAiAudioTranscriptionModel
(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options) OpenAiAudioTranscriptionModel is a client class used to interact with the OpenAI Audio Transcription API.OpenAiAudioTranscriptionModel
(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options, org.springframework.retry.support.RetryTemplate retryTemplate) OpenAiAudioTranscriptionModel is a client class used to interact with the OpenAI Audio Transcription API. -
Method Summary
Modifier and TypeMethodDescriptioncall
(AudioTranscriptionPrompt transcriptionPrompt) Executes a method call to the AI model.call
(org.springframework.core.io.Resource audioResource)
-
Constructor Details
-
OpenAiAudioTranscriptionModel
OpenAiAudioTranscriptionModel is a client class used to interact with the OpenAI Audio Transcription API.- Parameters:
audioApi
- The OpenAiAudioApi instance to be used for making API calls.
-
OpenAiAudioTranscriptionModel
public OpenAiAudioTranscriptionModel(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options) OpenAiAudioTranscriptionModel is a client class used to interact with the OpenAI Audio Transcription API.- Parameters:
audioApi
- The OpenAiAudioApi instance to be used for making API calls.options
- The OpenAiAudioTranscriptionOptions instance for configuring the audio transcription.
-
OpenAiAudioTranscriptionModel
public OpenAiAudioTranscriptionModel(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options, org.springframework.retry.support.RetryTemplate retryTemplate) OpenAiAudioTranscriptionModel is a client class used to interact with the OpenAI Audio Transcription API.- Parameters:
audioApi
- The OpenAiAudioApi instance to be used for making API calls.options
- The OpenAiAudioTranscriptionOptions instance for configuring the audio transcription.retryTemplate
- The RetryTemplate instance for retrying failed API calls.
-
-
Method Details
-
call
-
call
Description copied from interface:Model
Executes a method call to the AI model.- Specified by:
call
in interfaceModel<AudioTranscriptionPrompt,
AudioTranscriptionResponse> - Parameters:
transcriptionPrompt
- the request object to be sent to the AI model- Returns:
- the response from the AI model
-