View Source ExOpenAI.Components.RealtimeConversationItemWithReference (ex_openai.ex v2.0.0-beta2)
The item to add to the conversation.
Fields
:arguments- optional -String.t()
The arguments of the function call (forfunction_callitems).:call_id- optional -String.t()
The ID of the function call (forfunction_callandfunction_call_outputitems). If passed on afunction_call_outputitem, the server will check that afunction_callitem with the same ID exists in the conversation history.:content- optional -[{:%{}, [], [{{:optional, [], [:audio]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:optional, [], [:id]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:optional, [], [:text]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:optional, [], [:transcript]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:optional, [], [:type]}, {:|, [], [{:|, [], [{:|, [], [:input_audio, :input_text]}, :item_reference]}, :text]}}]}]
The content of the message, applicable formessageitems.
- Message items of role
systemsupport onlyinput_textcontent - Message items of role
usersupportinput_textandinput_audiocontent - Message items of role
assistantsupporttextcontent.
:id- optional -String.t()
For an item of type (message|function_call|function_call_output) this field allows the client to assign the unique ID of the item. It is not required because the server will generate one if not provided.
For an item of type item_reference, this field is required and is a
reference to any item that has previously existed in the conversation.
:name- optional -String.t()
The name of the function being called (forfunction_callitems).:object- optional -:"realtime.item"
Identifier for the API object being returned - alwaysrealtime.item.
Allowed values:"realtime.item":output- optional -String.t()
The output of the function call (forfunction_call_outputitems).:role- optional -:user | :assistant | :system
The role of the message sender (user,assistant,system), only applicable formessageitems.
Allowed values:"user","assistant","system":status- optional -:completed | :incomplete | :in_progress
The status of the item (completed,incomplete,in_progress). These have no effect on the conversation, but are accepted for consistency with theconversation.item.createdevent.
Allowed values:"completed","incomplete","in_progress":type- optional -:message | :function_call | :function_call_output
The type of the item (message,function_call,function_call_output,item_reference).
Allowed values:"message","function_call","function_call_output"
Summary
Types
@type t() :: %ExOpenAI.Components.RealtimeConversationItemWithReference{ arguments: String.t() | nil, call_id: String.t() | nil, content: [ %{ optional(:audio) => String.t(), optional(:id) => String.t(), optional(:text) => String.t(), optional(:transcript) => String.t(), optional(:type) => ((:input_audio | :input_text) | :item_reference) | :text } ] | nil, id: String.t() | nil, name: String.t() | nil, object: :"realtime.item" | nil, output: String.t() | nil, role: ((:user | :assistant) | :system) | nil, status: ((:completed | :incomplete) | :in_progress) | nil, type: ((:message | :function_call) | :function_call_output) | nil }