Skip to content

Commit

Permalink
Upadte tool config parse logic
Browse files Browse the repository at this point in the history
  • Loading branch information
isanwenyu committed Jun 9, 2023
1 parent f39b77d commit 143893c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/tool/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def on_handle_context(self, e_context: EventContext):
def _read_json(self) -> dict:
curdir = os.path.dirname(__file__)
config_path = os.path.join(curdir, "config.json")
tool_config = {"tools": conf().get("tools", []), "kwargs": conf().get("tool_kwargs", {})}
tool_config = {"tools": json.loads(str(conf().get("tools", "[]"))), "kwargs": json.loads(str(conf().get("tool_kwargs", "{}")))}
if not os.path.exists(config_path):
return tool_config
else:
Expand Down

0 comments on commit 143893c

Please sign in to comment.