Class: OpenAI::Models::Realtime::ConversationItemWithReference

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/conversation_item_with_reference.rb

Defined Under Namespace

Modules: Object, Role, Status, Type Classes: Content

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Internal::Type::BaseModel

#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from OpenAI::Internal::Type::BaseModel

Instance Attribute Details

#argumentsString?

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

Returns:

  • (String, nil)


22
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 22

optional :arguments, String

#call_idString?

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.

Returns:

  • (String, nil)


30
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 30

optional :call_id, String

#contentArray<OpenAI::Models::Realtime::ConversationItemWithReference::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.



40
41
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 40

optional :content,
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Realtime::ConversationItemWithReference::Content] }

#idString?

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.

Returns:

  • (String, nil)


16
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 16

optional :id, String

#nameString?

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

Returns:

  • (String, nil)


47
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 47

optional :name, String

#objectSymbol, ...

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



53
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 53

optional :object, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Object }

#outputString?

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

Returns:

  • (String, nil)


59
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 59

optional :output, String

#roleSymbol, ...

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



66
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 66

optional :role, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Role }

#statusSymbol, ...

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.



74
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 74

optional :status, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Status }

#typeSymbol, ...

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



81
# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 81

optional :type, enum: -> { OpenAI::Realtime::ConversationItemWithReference::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/conversation_item_with_reference.rb', line 169