Exception: Desiru::TokenLimitError

Inherits:
ModelError show all
Defined in:
lib/desiru/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#context, #original_error

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, token_count: nil, token_limit: nil) ⇒ TokenLimitError

Returns a new instance of TokenLimitError.



62
63
64
65
66
# File 'lib/desiru/errors.rb', line 62

def initialize(message = nil, token_count: nil, token_limit: nil, **)
  @token_count = token_count
  @token_limit = token_limit
  super(message, **)
end

Instance Attribute Details

#token_countObject (readonly)

Returns the value of attribute token_count.



60
61
62
# File 'lib/desiru/errors.rb', line 60

def token_count
  @token_count
end

#token_limitObject (readonly)

Returns the value of attribute token_limit.



60
61
62
# File 'lib/desiru/errors.rb', line 60

def token_limit
  @token_limit
end