Class: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb,
sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs

Defined Under Namespace

Modules: Data

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(data:, first_id:, has_more:, last_id:, object: :list) ⇒ Object

Parameters:

  • data

    A list of items

  • first_id

    The ID of the first item in the list.

  • has_more

    Whether there are more items available.

  • last_id

    The ID of the last item in the list.

  • object (defaults to: :list)

    The type of object returned, must be list.



# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 41

Instance Attribute Details

#data::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data]

A list of items

Returns:

  • (::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data])


12
13
14
15
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 12

required(
  :data,
  -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data] }
)

#first_idString?

The ID of the first item in the list.

Returns:

  • (String, nil)


21
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 21

required :first_id, String, nil?: true

#has_moreBoolean

Whether there are more items available.

Returns:



27
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 27

required :has_more, OpenAI::Internal::Type::Boolean

#last_idString?

The ID of the last item in the list.

Returns:

  • (String, nil)


33
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 33

required :last_id, String, nil?: true

#object:list

The type of object returned, must be list.

Returns:

  • (:list)


39
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 39

required :object, const: :list

Instance Method Details

#to_hash{

Returns:

  • ({)


50
# File 'sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs', line 50

def to_hash: -> {