Skip to content

Commit

Permalink
fixed the error
Browse files Browse the repository at this point in the history
  • Loading branch information
anisha1607 committed Jul 28, 2023
1 parent 1181bcb commit 328f6d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superagi/models/agent_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ def eval_agent_config(cls, key, value):
if key in ["name", "description", "agent_type", "exit", "model", "permission_type", "LTM_DB"]:
return value
elif key in ["project_id", "memory_window", "max_iterations", "iteration_interval", "knowledge"]:
return int(value)
if value is not None and value != 'None':
return int(value)
else:
return None

Check warning on line 200 in superagi/models/agent_template.py

View check run for this annotation

Codecov / codecov/patch

superagi/models/agent_template.py#L200

Added line #L200 was not covered by tests
elif key == "goal" or key == "constraints" or key == "instruction":
return eval(value)
elif key == "tools":
Expand Down

0 comments on commit 328f6d2

Please sign in to comment.