GenAI.Provider.OpenAI.Transcription
(Noizu Labs, GenAI Wrapper v0.3.2)
Copy Markdown
OpenAI speech-to-text (transcription) provider — a SYNC media provider (ADR-016).
Declares speech -> text (sync) and runs POST /v1/audio/transcriptions (multipart),
returning the transcript in the shared {:ok, %{data, mime, meta}} contract (data = the
text). The audio bytes ride in req.settings[:audio] (+ optional :filename,
:language, :hint); model defaults to whisper-1. No-key -> {:error, :missing_api_key},
no audio -> {:error, :missing_audio}.
Routing note: callers set input: [:speech] on the request (the audio is in settings,
not the prompt) so the Router selects this provider.
Summary
Functions
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7.
Return config_key inference provide application config stored under :genai entry
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
Prepare endpoint and method to make inference call to
Prepare request headers
Prepare request body to be passed to inference call.
Build and run inference thread
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1.
Build and run inference thread in streaming mode
Functions
chat(model, messages, tools, hyper_parameters, provider_settings \\ [], context \\ nil, options \\ nil)
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7.
Return config_key inference provide application config stored under :genai entry
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
Prepare endpoint and method to make inference call to
Prepare request headers
Prepare request body to be passed to inference call.
Build and run inference thread
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1.
Build and run inference thread in streaming mode