Package org.springframework.ai.openai
Class OpenAiAudioTranscriptionClient
java.lang.Object
org.springframework.ai.openai.OpenAiAudioTranscriptionClient
- All Implemented Interfaces:
ModelClient<AudioTranscriptionPrompt,
AudioTranscriptionResponse>
public class OpenAiAudioTranscriptionClient
extends Object
implements ModelClient<AudioTranscriptionPrompt,AudioTranscriptionResponse>
OpenAI audio transcription client implementation for backed by
OpenAiAudioApi
.- Since:
- 0.8.1
- Author:
- Michael Lavelle, Christian Tzolov
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionfinal org.springframework.retry.support.RetryTemplate
-
Constructor Summary
ConstructorDescriptionOpenAiAudioTranscriptionClient
(OpenAiAudioApi audioApi) OpenAiAudioTranscriptionClient is a client class used to interact with the OpenAI Audio Transcription API.OpenAiAudioTranscriptionClient
(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options) OpenAiAudioTranscriptionClient is a client class used to interact with the OpenAI Audio Transcription API.OpenAiAudioTranscriptionClient
(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options, org.springframework.retry.support.RetryTemplate retryTemplate) OpenAiAudioTranscriptionClient is a client class used to interact with the OpenAI Audio Transcription API. -
Method Summary
Modifier and TypeMethodDescriptioncall
(AudioTranscriptionPrompt request) Executes a method call to the AI model.call
(org.springframework.core.io.Resource audioResource)
-
Field Details
-
retryTemplate
public final org.springframework.retry.support.RetryTemplate retryTemplate
-
-
Constructor Details
-
OpenAiAudioTranscriptionClient
OpenAiAudioTranscriptionClient 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.
-
OpenAiAudioTranscriptionClient
public OpenAiAudioTranscriptionClient(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options) OpenAiAudioTranscriptionClient 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.
-
OpenAiAudioTranscriptionClient
public OpenAiAudioTranscriptionClient(OpenAiAudioApi audioApi, OpenAiAudioTranscriptionOptions options, org.springframework.retry.support.RetryTemplate retryTemplate) OpenAiAudioTranscriptionClient 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:ModelClient
Executes a method call to the AI model.- Specified by:
call
in interfaceModelClient<AudioTranscriptionPrompt,
AudioTranscriptionResponse> - Parameters:
request
- the request object to be sent to the AI model- Returns:
- the response from the AI model
-