class

OpenAI::RealtimeConversationItemWithReference

Inherits JSON::Serializable < Reference < Object

The item to add to the conversation.

Constructors

new(id : String | Nil = nil, type_value : RealtimeConversationItemWithReferenceType | Nil = nil, object : RealtimeConversationItemWithReferenceObject | Nil = nil, status : RealtimeConversationItemWithReferenceStatus | Nil = nil, role : RealtimeConversationItemWithReferenceRole | Nil = nil, content : Array(RealtimeConversationItemWithReferenceContentItem) | Nil = nil, call_id : String | Nil = nil, name : String | Nil = nil, arguments : String | Nil = nil, output : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

arguments

The arguments of the function call (for function_call items).

Source
arguments=(arguments : String | Nil)

The arguments of the function call (for function_call items).

Source
call_id

The ID of the function call (for function_call and function_call_output items). If passed on a function_call_output item, the server will check that a function_call item with the same ID exists in the conversation history.

Source
call_id=(call_id : String | Nil)

The ID of the function call (for function_call and function_call_output items). If passed on a function_call_output item, the server will check that a function_call item with the same ID exists in the conversation history.

Source
content

The content of the message, applicable for message items.

  • Message items of role system support only input_text content
  • Message items of role user support input_text and input_audio content
  • Message items of role assistant support text content.
Source
content=(content : Array(RealtimeConversationItemWithReferenceContentItem) | Nil)

The content of the message, applicable for message items.

  • Message items of role system support only input_text content
  • Message items of role user support input_text and input_audio content
  • Message items of role assistant support text content.
Source
id

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.

Source
id=(id : String | Nil)

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.

Source
name

The name of the function being called (for function_call items).

Source
name=(name : String | Nil)

The name of the function being called (for function_call items).

Source
object

Identifier for the API object being returned - always realtime.item.

Source
object=(object : RealtimeConversationItemWithReferenceObject | Nil)

Identifier for the API object being returned - always realtime.item.

Source
output

The output of the function call (for function_call_output items).

Source
output=(output : String | Nil)

The output of the function call (for function_call_output items).

Source
role

The role of the message sender (user, assistant, system), only applicable for message items.

Source
role=(role : RealtimeConversationItemWithReferenceRole | Nil)

The role of the message sender (user, assistant, system), only applicable for message items.

Source
status

The status of the item (completed, incomplete, in_progress). These have no effect on the conversation, but are accepted for consistency with the conversation.item.created event.

Source
status=(status : RealtimeConversationItemWithReferenceStatus | Nil)

The status of the item (completed, incomplete, in_progress). These have no effect on the conversation, but are accepted for consistency with the conversation.item.created event.

Source
type_value

The type of the item (message, function_call, function_call_output, item_reference).

Source
type_value=(type_value : RealtimeConversationItemWithReferenceType | Nil)

The type of the item (message, function_call, function_call_output, item_reference).

Source