Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: more instructive error for function loading (#945)

tombedorf2bf929bd40a
diff --git a/memgpt/presets/utils.py b/memgpt/presets/utils.py
index 9d33d8861..68d246d2e 100644
--- a/memgpt/presets/utils.py
+++ b/memgpt/presets/utils.py
@@ -23,7 +23,9 @@ def is_valid_yaml_format(yaml_data, function_set):
# Check if all functions in YAML are part of function_set
if not set(yaml_data["functions"]).issubset(function_set):
- raise ValueError("Some functions in YAML are not part of the provided function set.")
+ raise ValueError(
+ f"Some functions in YAML are not part of the provided function set: {set(yaml_data['functions']) - set(function_set)} "
+ )
# If all checks pass
return True