Skip to content

Commit

Permalink
Lint AutoGPT
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Oct 18, 2023
1 parent 8dbcdc2 commit e9b64ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogpts/autogpt/autogpt/core/prompting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def json_loads(json_str: str):
# Can hopefully just replace with a call to ast.literal_eval (the function api still
# sometimes returns json strings with minor issues like trailing commas).
try:
json_str = json_str[json_str.index("{"):json_str.rindex("}")+1]
json_str = json_str[json_str.index("{") : json_str.rindex("}") + 1]
return ast.literal_eval(json_str)
except json.decoder.JSONDecodeError as e:
try:
Expand Down

0 comments on commit e9b64ad

Please sign in to comment.