Skip to content

Commit

Permalink
fix: more instructive error for function loading (#945)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombedor authored Jan 31, 2024
1 parent 5a374ed commit c332c68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion memgpt/presets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c332c68

Please # to comment.