diff --git a/pilot/helpers/exceptions/ApiKeyNotDefinedError.py b/pilot/helpers/exceptions/ApiKeyNotDefinedError.py index 1071a32..37741d4 100644 --- a/pilot/helpers/exceptions/ApiKeyNotDefinedError.py +++ b/pilot/helpers/exceptions/ApiKeyNotDefinedError.py @@ -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}") diff --git a/pilot/helpers/exceptions/__init__.py b/pilot/helpers/exceptions/__init__.py index 7bacb04..977859e 100644 --- a/pilot/helpers/exceptions/__init__.py +++ b/pilot/helpers/exceptions/__init__.py @@ -1,2 +1,3 @@ -from .AgentConvo import AgentConvo -from .Project import Project +from .ApiKeyNotDefinedError import ApiKeyNotDefinedError +from .TokenLimitError import TokenLimitError +from .TooDeepRecursionError import TooDeepRecursionError