From ff6c84f67766a9571c9f23a6a67605382e6251d8 Mon Sep 17 00:00:00 2001 From: cpacker Date: Mon, 4 Dec 2023 14:36:41 -0800 Subject: [PATCH] swapping out hardcoded str for prefix (forgot to include in #569) --- memgpt/functions/functions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/memgpt/functions/functions.py b/memgpt/functions/functions.py index e5296f7a28..af1ced56ff 100644 --- a/memgpt/functions/functions.py +++ b/memgpt/functions/functions.py @@ -69,18 +69,18 @@ def load_all_function_sets(merge=True): except ModuleNotFoundError as e: # Handle missing module imports missing_package = str(e).split("'")[1] # Extract the name of the missing package - print(f"Warning: skipped loading python file '{module_full_path}'!") + print(f"{CLI_WARNING_PREFIX}skipped loading python file '{module_full_path}'!") print( f"'{file}' imports '{missing_package}', but '{missing_package}' is not installed locally - install python package '{missing_package}' to link functions from '{file}' to MemGPT." ) continue except SyntaxError as e: # Handle syntax errors in the module - print(f"Warning: skipped loading python file '{file}' due to a syntax error: {e}") + print(f"{CLI_WARNING_PREFIX}skipped loading python file '{file}' due to a syntax error: {e}") continue except Exception as e: # Handle other general exceptions - print(f"Warning: skipped loading python file '{file}': {e}") + print(f"{CLI_WARNING_PREFIX}skipped loading python file '{file}': {e}") continue else: # For built-in scripts, use the existing method @@ -89,7 +89,7 @@ def load_all_function_sets(merge=True): module = importlib.import_module(full_module_name) except Exception as e: # Handle other general exceptions - print(f"Warning: skipped loading python module '{full_module_name}': {e}") + print(f"{CLI_WARNING_PREFIX}skipped loading python module '{full_module_name}': {e}") continue try: