Class: OpenAI::Models::Beta::ChatKit::ChatKitThread

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

Overview

See Also:

  • OpenAI::Resources::Beta::ChatKit::Threads#retrieve

Defined Under Namespace

Modules: Status

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:, status:, title:, user:, object: :"chatkit.thread") ⇒ ChatKitThread

Returns a new instance of ChatKitThread.

Parameters:

  • id —

    Identifier of the thread.

  • created_at —

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

  • status —

    Current status for the thread. Defaults to active for newly created threads.

  • title —

    Optional human-readable title for the thread. Defaults to null when no title has been generated.

  • user —

    Free-form string that identifies your end user who owns the thread.

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

    Type discriminator that is always chatkit.thread.

  • id: (String)
  • created_at: (Integer)
  • status: (OpenAI::Models::Beta::ChatKit::ChatKitThread::status)
  • title: (String, nil)
  • user: (String)
  • object: (:"chatkit.thread") (defaults to: :"chatkit.thread")


# File 'lib/openai/models/beta/chatkit/chatkit_thread.rb', line 46

Instance Attribute Details

#created_at ⇒ Integer

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

Returns:

  • (Integer)


19
# File 'lib/openai/models/beta/chatkit/chatkit_thread.rb', line 19

required :created_at, Integer

#id ⇒ String

Identifier of the thread.

Returns:

  • (String)


13
# File 'lib/openai/models/beta/chatkit/chatkit_thread.rb', line 13

required :id, String

#object ⇒ :"chatkit.thread"

Type discriminator that is always chatkit.thread.

Returns:

  • (:"chatkit.thread")


25
# File 'lib/openai/models/beta/chatkit/chatkit_thread.rb', line 25

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

#status ⇒ OpenAI::Models::Beta::ChatKit::ChatKitThread::status

Current status for the thread. Defaults to active for newly created threads.

Returns:

  • (OpenAI::Models::Beta::ChatKit::ChatKitThread::status)


31
# File 'lib/openai/models/beta/chatkit/chatkit_thread.rb', line 31

required :status, union: -> { OpenAI::Beta::ChatKit::ChatKitThread::Status }

#title ⇒ String?

Optional human-readable title for the thread. Defaults to null when no title has been generated.

Returns:

  • (String, nil)


38
# File 'lib/openai/models/beta/chatkit/chatkit_thread.rb', line 38

required :title, String, nil?: true

#user ⇒ String

Free-form string that identifies your end user who owns the thread.

Returns:

  • (String)


44
# File 'lib/openai/models/beta/chatkit/chatkit_thread.rb', line 44

required :user, String

Instance Method Details

#to_hash ⇒ { id: String, created_at: Integer, ?object: :"chatkit.thread", status: OpenAI::Models::Beta::ChatKit::ChatKitThread::status, title: String?, user: String }

Returns:

  • ({ id: String, created_at: Integer, ?object: :"chatkit.thread", status: OpenAI::Models::Beta::ChatKit::ChatKitThread::status, title: String?, user: String })


59
60
61
62
63
64
65
66
# File 'sig/openai/models/beta/chatkit/chatkit_thread.rbs', line 59

def to_hash: -> {
  id: String,
  created_at: Integer,
  ?object: :"chatkit.thread",
  status: OpenAI::Models::Beta::ChatKit::ChatKitThread::status,
  title: String?,
  user: String
}