Class: WhopSDK::Models::AIChat

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/ai_chat.rb

Overview

Defined Under Namespace

Classes: User

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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:, blended_token_usage:, created_at:, last_message_at:, message_count:, notification_preference:, title:, updated_at:, user:) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::AIChat for more details.

An AI-powered chat conversation belonging to a user, with optional scheduled automation.

Parameters:

  • id (String)

    The unique identifier for the ai chat.

  • blended_token_usage (String)

    The total number of tokens consumed across all messages in this conversation.

  • created_at (Time)

    The datetime the ai chat was created.

  • last_message_at (Time, nil)

    The timestamp of the most recent message in this conversation. Null if no messag

  • message_count (Integer)

    The total number of messages exchanged in this conversation.

  • notification_preference (Symbol, WhopSDK::Models::NotificationPreferences)

    The notification preference for this AI chat. ‘all` delivers AI chat notificatio

  • title (String, nil)

    A short descriptive title for this AI chat conversation. Null if no title has be

  • updated_at (Time)

    The datetime the ai chat was last updated.

  • user (WhopSDK::Models::AIChat::User)

    The user who owns this AI chat conversation.



# File 'lib/whop_sdk/models/ai_chat.rb', line 64

Instance Attribute Details

#blended_token_usageString

The total number of tokens consumed across all messages in this conversation.

Returns:

  • (String)


17
# File 'lib/whop_sdk/models/ai_chat.rb', line 17

required :blended_token_usage, String

#created_atTime

The datetime the ai chat was created.

Returns:

  • (Time)


23
# File 'lib/whop_sdk/models/ai_chat.rb', line 23

required :created_at, Time

#idString

The unique identifier for the ai chat.

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/ai_chat.rb', line 11

required :id, String

#last_message_atTime?

The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.

Returns:

  • (Time, nil)


30
# File 'lib/whop_sdk/models/ai_chat.rb', line 30

required :last_message_at, Time, nil?: true

#message_countInteger

The total number of messages exchanged in this conversation.

Returns:

  • (Integer)


36
# File 'lib/whop_sdk/models/ai_chat.rb', line 36

required :message_count, Integer

#notification_preferenceSymbol, WhopSDK::Models::NotificationPreferences

The notification preference for this AI chat. ‘all` delivers AI chat notifications and badges, while `none` mutes them.



43
# File 'lib/whop_sdk/models/ai_chat.rb', line 43

required :notification_preference, enum: -> { WhopSDK::NotificationPreferences }

#titleString?

A short descriptive title for this AI chat conversation. Null if no title has been set.

Returns:

  • (String, nil)


50
# File 'lib/whop_sdk/models/ai_chat.rb', line 50

required :title, String, nil?: true

#updated_atTime

The datetime the ai chat was last updated.

Returns:

  • (Time)


56
# File 'lib/whop_sdk/models/ai_chat.rb', line 56

required :updated_at, Time

#userWhopSDK::Models::AIChat::User

The user who owns this AI chat conversation.



62
# File 'lib/whop_sdk/models/ai_chat.rb', line 62

required :user, -> { WhopSDK::AIChat::User }