View Source ExOpenAi.Audio.Translation (ex_open_ai v2.0.1)

Represents a translation request to the OpenAI API.

examples

Examples

iex> params = %{
...>   model: "whisper-1",
...>   file: "path/to/some_file.mp3",
...>   prompt: "translate this to french"
...> }
iex> ExOpenAi.Audio.Translation.create(params)
{:ok, %ExOpenAi.Audio.Translation{...}}

Link to this section Summary

Link to this section Types

@type t() :: %ExOpenAi.Audio.Translation{text: String.t()}

Link to this section Functions

Link to this function

create_with_file(data, file_key, options \\ [])

View Source
@spec create_with_file(ExOpenAi.Api.data(), atom(), list()) ::
  ExOpenAi.Parser.parsed_response()
@spec do_new(%ExOpenAi.Audio.Translation{text: term()}, attributes :: list()) ::
  %ExOpenAi.Audio.Translation{text: term()}
Link to this function

keep_it_simple(response, _)

View Source
@spec new() :: %ExOpenAi.Audio.Translation{text: term()}
@spec new(attributes :: list()) :: %ExOpenAi.Audio.Translation{text: term()}