Creates a new TokenLimitReachedException.
Parameters
$messagestringoptional- The exception message.
Default:
'' $maxTokensint|nulloptional- The token limit that was reached, if known.
Default:
null $previousThrowable|nulloptional- The previous throwable used for exception chaining.
Default:
null
Source
public function __construct(string $message = '', ?int $maxTokens = null, ?\Throwable $previous = null)
{
parent::__construct($message, 0, $previous);
$this->maxTokens = $maxTokens;
}
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.