Class: OpenAI::Models::Beta::ChatKit::ChatSession

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

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:, chatkit_configuration:, client_secret:, expires_at:, max_requests_per_1_minute:, rate_limits:, status:, user:, workflow:, object: :"chatkit.session") ⇒ Object

Parameters:

  • id —

    Identifier for the ChatKit session.

  • chatkit_configuration —

    Resolved ChatKit feature configuration for the session.

  • client_secret —

    Ephemeral client secret that authenticates session requests.

  • expires_at —

    Unix timestamp (in seconds) for when the session expires.

  • max_requests_per_1_minute —

    Convenience copy of the per-minute request limit.

  • rate_limits —

    Resolved rate limit values.

  • status —

    Current lifecycle state of the session.

  • user —

    User identifier associated with the session.

  • workflow —

    Workflow metadata for the session.

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

    Type discriminator that is always chatkit.session.



# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 68

Instance Attribute Details

#chatkit_configuration ⇒ OpenAI::Beta::ChatKit::ChatSessionChatKitConfiguration

Resolved ChatKit feature configuration for the session.

Returns:

  • (OpenAI::Beta::ChatKit::ChatSessionChatKitConfiguration)


18
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 18

required :chatkit_configuration, -> { OpenAI::Beta::ChatKit::ChatSessionChatKitConfiguration }

#client_secret ⇒ String

Ephemeral client secret that authenticates session requests.

Returns:

  • (String)


24
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 24

required :client_secret, String

#expires_at ⇒ Integer

Unix timestamp (in seconds) for when the session expires.

Returns:

  • (Integer)


30
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 30

required :expires_at, Integer

#id ⇒ String

Identifier for the ChatKit session.

Returns:

  • (String)


12
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 12

required :id, String

#max_requests_per_1_minute ⇒ Integer

Convenience copy of the per-minute request limit.

Returns:

  • (Integer)


36
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 36

required :max_requests_per_1_minute, Integer

#object ⇒ :"chatkit.session"

Type discriminator that is always chatkit.session.

Returns:

  • (:"chatkit.session")


42
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 42

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

#rate_limits ⇒ OpenAI::Beta::ChatKit::ChatSessionRateLimits

Resolved rate limit values.

Returns:

  • (OpenAI::Beta::ChatKit::ChatSessionRateLimits)


48
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 48

required :rate_limits, -> { OpenAI::Beta::ChatKit::ChatSessionRateLimits }

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

Current lifecycle state of the session.

Returns:

  • (OpenAI::Models::Beta::ChatKit::chat_session_status)


54
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 54

required :status, enum: -> { OpenAI::Beta::ChatKit::ChatSessionStatus }

#user ⇒ String

User identifier associated with the session.

Returns:

  • (String)


60
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 60

required :user, String

#workflow ⇒ OpenAI::Beta::ChatKitWorkflow

Workflow metadata for the session.

Returns:

  • (OpenAI::Beta::ChatKitWorkflow)


66
# File 'lib/openai/models/beta/chatkit/chat_session.rb', line 66

required :workflow, -> { OpenAI::Beta::ChatKitWorkflow }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


83
# File 'sig/openai/models/beta/chatkit/chat_session.rbs', line 83

def to_hash: -> {