Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Only print JSON object validation message in debug mode

Merwane Hamadib5e0127b16bb
diff --git a/autogpt/json_validation/validate_json.py b/autogpt/json_validation/validate_json.py
index 127fcc17f4..440c3b0b91 100644
--- a/autogpt/json_validation/validate_json.py
+++ b/autogpt/json_validation/validate_json.py
@@ -24,7 +24,7 @@ def validate_json(json_object: object, schema_name: object) -> object:
for error in errors:
logger.error(f"Error: {error.message}")
- else:
+ elif CFG.debug_mode:
print("The JSON object is valid.")
return json_object