Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: creation of invalid tool in tool builder (#1402)
Ville H021cfcd8be43
diff --git a/memgpt/functions/functions.py b/memgpt/functions/functions.pyindex 233ed26e9..8cade7704 100644--- a/memgpt/functions/functions.py+++ b/memgpt/functions/functions.py@@ -69,7 +69,7 @@ def write_function(module_name: str, function_name: str, function_code: str):# Write the function to a filefile_path = os.path.join(USER_FUNCTIONS_DIR, f"{module_name}.py")- with open(file_path, "a") as f:+ with open(file_path, "w") as f:f.write(function_code)succ, error = validate_function(module_name, file_path)