Class SpeechHttpExecutor
- java.lang.Object
-
- bg.codexio.ai.openai.api.http.DefaultOpenAIHttpExecutor<SpeechRequest,AudioBinaryResponse>
-
- bg.codexio.ai.openai.api.http.voice.SpeechHttpExecutor
-
- All Implemented Interfaces:
OpenAIHttpExecutor<SpeechRequest,AudioBinaryResponse>
public class SpeechHttpExecutor extends DefaultOpenAIHttpExecutor<SpeechRequest,AudioBinaryResponse>
Implementation for Text-To-Speech API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface bg.codexio.ai.openai.api.http.OpenAIHttpExecutor
OpenAIHttpExecutor.ReactiveExecution<O>
-
-
Field Summary
-
Fields inherited from class bg.codexio.ai.openai.api.http.DefaultOpenAIHttpExecutor
baseUrl, client, objectMapper, resourceUri, responseType, streamable
-
-
Constructor Summary
Constructors Constructor Description SpeechHttpExecutor(HttpExecutorContext context, com.fasterxml.jackson.databind.ObjectMapper objectMapper)SpeechHttpExecutor(okhttp3.OkHttpClient client, String baseUrl, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AudioBinaryResponsetoResponse(String response)protected AudioBinaryResponsetoResponse(okhttp3.Response response)-
Methods inherited from class bg.codexio.ai.openai.api.http.DefaultOpenAIHttpExecutor
canStream, configureObjectMapper, convertFormDataFieldName, execute, executeAsync, executeReactive, getEnv, getField, getFormDataMimeType, hydrateFormData, log, prepareRequest, reinitializeExecutionIdentification, setFormDataMimeType, setMultipartBoundary, toError, toFormData, toJson
-
-
-
-
Constructor Detail
-
SpeechHttpExecutor
public SpeechHttpExecutor(okhttp3.OkHttpClient client, String baseUrl, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
SpeechHttpExecutor
public SpeechHttpExecutor(HttpExecutorContext context, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
toResponse
protected AudioBinaryResponse toResponse(okhttp3.Response response) throws IOException
- Overrides:
toResponsein classDefaultOpenAIHttpExecutor<SpeechRequest,AudioBinaryResponse>- Throws:
IOException
-
toResponse
protected AudioBinaryResponse toResponse(String response)
- Overrides:
toResponsein classDefaultOpenAIHttpExecutor<SpeechRequest,AudioBinaryResponse>
-
-