Class: OpenAI::Models::Conversations::Conversation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/conversations/conversation.rb,
sig/openai/models/conversations/conversation.rbs

Overview

See Also:

  • OpenAI::Resources::Conversations#create

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #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, coerce_with_error, 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

#initialize(id:, created_at:, metadata:, object: :conversation) ⇒ Object

Parameters:

  • id —

    The unique ID of the conversation.

  • created_at —

    The time at which the conversation was created, measured in seconds since the Unix epoch.

  • metadata —

    Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

  • object (defaults to: :conversation) —

    The object type, which is always conversation.



# File 'lib/openai/models/conversations/conversation.rb', line 37


Instance Attribute Details

#created_at ⇒ Integer

The time at which the conversation was created, measured in seconds since the Unix epoch.

Returns:

  • (Integer)


19
# File 'lib/openai/models/conversations/conversation.rb', line 19

required :created_at, Integer

#id ⇒ String

The unique ID of the conversation.

Returns:

  • (String)


12
# File 'lib/openai/models/conversations/conversation.rb', line 12

required :id, String

#metadata ⇒ top

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Returns:

  • (top)


29
# File 'lib/openai/models/conversations/conversation.rb', line 29

required :metadata, OpenAI::Internal::Type::Unknown

#object ⇒ :conversation

The object type, which is always conversation.

Returns:

  • (:conversation)


35
# File 'lib/openai/models/conversations/conversation.rb', line 35

required :object, const: :conversation

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


50
# File 'sig/openai/models/conversations/conversation.rbs', line 50

def to_hash: -> {