Exception: Langchain::Utils::TokenLength::TokenLimitExceeded

Inherits:
StandardError
  • Object
show all
Defined in:
lib/langchain/utils/token_length/token_limit_exceeded.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "", token_overflow = 0) ⇒ TokenLimitExceeded

Returns a new instance of TokenLimitExceeded.



9
10
11
12
13
# File 'lib/langchain/utils/token_length/token_limit_exceeded.rb', line 9

def initialize(message = "", token_overflow = 0)
  super(message)

  @token_overflow = token_overflow
end

Instance Attribute Details

#token_overflowObject (readonly)

Returns the value of attribute token_overflow.



7
8
9
# File 'lib/langchain/utils/token_length/token_limit_exceeded.rb', line 7

def token_overflow
  @token_overflow
end