View Source ExOpenAI.Components.ChatCompletionResponseMessage (ex_openai.ex v2.0.0-beta2)
A chat completion message generated by the model.
Fields
:annotations- optional -[{:%{}, [], [{{:required, [], [:type]}, :url_citation}, {{:required, [], [:url_citation]}, {:%{}, [], [{{:required, [], [:end_index]}, {:integer, [], []}}, {{:required, [], [:start_index]}, {:integer, [], []}}, {{:required, [], [:title]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:required, [], [:url]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}]}}]}]
Annotations for the message, when applicable, as when using the web search tool.:audio- optional -{:%{}, [], [{{:required, [], [:data]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:required, [], [:expires_at]}, {:integer, [], []}}, {{:required, [], [:id]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:required, [], [:transcript]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}]} | any():content- required -String.t() | any():function_call- optional -{:%{}, [], [{{:required, [], [:arguments]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:required, [], [:name]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}]}
Deprecated and replaced bytool_calls. The name and arguments of a function that should be called, as generated by the model.:refusal- required -String.t() | any():role- required -:assistant
The role of the author of this message.
Allowed values:"assistant":tool_calls- optional -ExOpenAI.Components.ChatCompletionMessageToolCalls.t()
Summary
Types
@type t() :: %ExOpenAI.Components.ChatCompletionResponseMessage{ annotations: [ %{ type: :url_citation, url_citation: %{ end_index: integer(), start_index: integer(), title: String.t(), url: String.t() } } ] | nil, audio: (%{ data: String.t(), expires_at: integer(), id: String.t(), transcript: String.t() } | any()) | nil, content: String.t() | any(), function_call: %{arguments: String.t(), name: String.t()} | nil, refusal: String.t() | any(), role: :assistant, tool_calls: ExOpenAI.Components.ChatCompletionMessageToolCalls.t() | nil }