Class: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask

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: TaskType

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(id:, created_at:, heading:, summary:, task_type:, thread_id:, object: :"chatkit.thread_item", type: :"chatkit.task") ⇒ ChatKitTask

Returns a new instance of ChatKitTask.

Parameters:

  • id —

    Identifier of the thread item.

  • created_at —

    Unix timestamp (in seconds) for when the item was created.

  • heading —

    Optional heading for the task. Defaults to null when not provided.

  • summary —

    Optional summary that describes the task. Defaults to null when omitted.

  • task_type —

    Subtype for the task.

  • thread_id —

    Identifier of the parent thread.

  • object (defaults to: :"chatkit.thread_item") —

    Type discriminator that is always chatkit.thread_item.

  • type (defaults to: :"chatkit.task") —

    Type discriminator that is always chatkit.task.

  • id: (String)
  • created_at: (Integer)
  • heading: (String, nil)
  • summary: (String, nil)
  • task_type: (OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type)
  • thread_id: (String)
  • object: (:"chatkit.thread_item") (defaults to: :"chatkit.thread_item")
  • type: (:"chatkit.task") (defaults to: :"chatkit.task")


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

Instance Attribute Details

#created_at ⇒ Integer

Unix timestamp (in seconds) for when the item was created.

Returns:

  • (Integer)


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

required :created_at, Integer

#heading ⇒ String?

Optional heading for the task. Defaults to null when not provided.

Returns:

  • (String, nil)


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

required :heading, String, nil?: true

#id ⇒ String

Identifier of the thread item.

Returns:

  • (String)


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

required :id, String

#object ⇒ :"chatkit.thread_item"

Type discriminator that is always chatkit.thread_item.

Returns:

  • (:"chatkit.thread_item")


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

required :object, const: :"chatkit.thread_item"

#summary ⇒ String?

Optional summary that describes the task. Defaults to null when omitted.

Returns:

  • (String, nil)


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

required :summary, String, nil?: true

#task_type ⇒ OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type

Subtype for the task.

Returns:

  • (OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type)


234
235
236
237
# File 'lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb', line 234

required(
  :task_type,
  enum: -> { OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType }
)

#thread_id ⇒ String

Identifier of the parent thread.

Returns:

  • (String)


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

required :thread_id, String

#type ⇒ :"chatkit.task"

Type discriminator that is always chatkit.task.

Returns:

  • (:"chatkit.task")


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

required :type, const: :"chatkit.task"

Instance Method Details

#to_hash ⇒ { id: String, created_at: Integer, heading: String?, ?object: :"chatkit.thread_item", summary: String?, task_type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type, thread_id: String, ?type: :"chatkit.task" }

Returns:

  • ({ id: String, created_at: Integer, heading: String?, ?object: :"chatkit.thread_item", summary: String?, task_type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type, thread_id: String, ?type: :"chatkit.task" })


238
239
240
241
242
243
244
245
246
247
# File 'sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs', line 238

def to_hash: -> {
  id: String,
  created_at: Integer,
  heading: String?,
  ?object: :"chatkit.thread_item",
  summary: String?,
  task_type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type,
  thread_id: String,
  ?type: :"chatkit.task"
}