-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
class TokenLimitError(Exception): | ||
def __init__(self, tokens_in_messages, max_tokens): | ||
self.tokens_in_messages = tokens_in_messages | ||
self.max_tokens = max_tokens | ||
super().__init__(f"Token limit error happened with {tokens_in_messages}/{max_tokens} tokens in messages!") | ||
class ApiKeyNotDefinedError(Exception): | ||
def __init__(self, env_key: str): | ||
self.env_key = env_key | ||
super().__init__(f"API Key has not been configured: {env_key}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from .AgentConvo import AgentConvo | ||
from .Project import Project | ||
from .ApiKeyNotDefinedError import ApiKeyNotDefinedError | ||
from .TokenLimitError import TokenLimitError | ||
from .TooDeepRecursionError import TooDeepRecursionError |