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

Represents a ChatKit thread and its current status.

Parameters:

  • Identifier of the thread.

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

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

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

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

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

    Type discriminator that is always chatkit.thread.



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

Instance Attribute Details

#created_atInteger

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

Parameters:

Returns:



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

required :created_at, Integer

#idString

Identifier of the thread.

Parameters:

Returns:



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

required :id, String

#objectSymbol, :"chatkit.thread"

Type discriminator that is always chatkit.thread.

Parameters:

Returns:



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

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

#statusOpenAI::Models::Beta::ChatKit::ChatKitThread::Status::Active, ...

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

Parameters:

Returns:



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

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

#titleString?

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

Parameters:

Returns:



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

required :title, String, nil?: true

#userString

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

Parameters:

Returns:



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

required :user, String

Instance Method Details

#to_hash{

Returns:



39
# File 'sig/openai/models/beta/chatkit/chatkit_thread.rbs', line 39

def to_hash: -> {