mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Added new logging function as an error or warning message
This commit is contained in:
@@ -124,6 +124,11 @@ class Logger(metaclass=Singleton):
|
||||
self.logger.setLevel(level)
|
||||
self.typing_logger.setLevel(level)
|
||||
|
||||
def double_check(self, additionalText=None):
|
||||
if not additionalText:
|
||||
additionalText = "Please ensure you've setup and configured everything correctly. Read https://github.com/Torantulino/Auto-GPT#readme to double check. You can also create a github issue or join the discord and ask there!"
|
||||
|
||||
self.typewriter_log("DOUBLE CHECK CONFIGURATION", Fore.YELLOW, additionalText)
|
||||
|
||||
'''
|
||||
Output stream to console using simulated typing
|
||||
|
||||
@@ -23,10 +23,8 @@ class PineconeMemory(MemoryProviderSingleton):
|
||||
pinecone.whoami()
|
||||
except Exception as e:
|
||||
logger.typewriter_log("FAILED TO CONNECT TO PINECONE", Fore.RED, Style.BRIGHT + str(e) + Style.RESET_ALL)
|
||||
logger.typewriter_log("DOUBLE CHECK CONFIGURATION",
|
||||
Fore.YELLOW,
|
||||
"Please ensure you have setup and configured Pinecone properly for use. " +
|
||||
f"You can check out {Fore.CYAN + Style.BRIGHT}https://github.com/Torantulino/Auto-GPT#-pinecone-api-key-setup{Style.RESET_ALL} to ensure you've set up everything correctly.")
|
||||
logger.double_check("Please ensure you have setup and configured Pinecone properly for use. " +
|
||||
f"You can check out {Fore.CYAN + Style.BRIGHT}https://github.com/Torantulino/Auto-GPT#-pinecone-api-key-setup{Style.RESET_ALL} to ensure you've set up everything correctly.")
|
||||
exit(1)
|
||||
|
||||
if table_name not in pinecone.list_indexes():
|
||||
|
||||
@@ -52,10 +52,8 @@ class RedisMemory(MemoryProviderSingleton):
|
||||
self.redis.ping()
|
||||
except redis.ConnectionError as e:
|
||||
logger.typewriter_log("FAILED TO CONNECT TO REDIS", Fore.RED, Style.BRIGHT + str(e) + Style.RESET_ALL)
|
||||
logger.typewriter_log("DOUBLE CHECK CONFIGURATION",
|
||||
Fore.YELLOW,
|
||||
"Please ensure you have setup and configured Redis properly for use. " +
|
||||
f"You can check out {Fore.CYAN + Style.BRIGHT}https://github.com/Torantulino/Auto-GPT#redis-setup{Style.RESET_ALL} to ensure you've set up everything correctly.")
|
||||
logger.double_check("Please ensure you have setup and configured Redis properly for use. " +
|
||||
f"You can check out {Fore.CYAN + Style.BRIGHT}https://github.com/Torantulino/Auto-GPT#redis-setup{Style.RESET_ALL} to ensure you've set up everything correctly.")
|
||||
exit(1)
|
||||
|
||||
if cfg.wipe_redis_on_start:
|
||||
|
||||
Reference in New Issue
Block a user