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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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) ⇒ ChatKitThreadItemList

Returns a new instance of ChatKitThreadItemList.

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.

  • data: (::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data])
  • first_id: (String, nil)
  • has_more: (Boolean)
  • last_id: (String, nil)
  • object: (:list) (defaults to: :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_id ⇒ String?

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_more ⇒ Boolean

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_id ⇒ String?

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 ⇒ { data: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data], first_id: String?, has_more: bool, last_id: String?, ?object: :list }

Returns:

  • ({ data: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data], first_id: String?, has_more: bool, last_id: String?, ?object: :list })


50
51
52
53
54
55
56
# File 'sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs', line 50

def to_hash: -> {
  data: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data],
  first_id: String?,
  has_more: bool,
  last_id: String?,
  ?object: :list
}