mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-18 13:55:17 +02:00
fix schema reading bug
This commit is contained in:
parent
1cabf2c503
commit
c32dcca293
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ class ToolRegistry:
|
|||
|
||||
with open(schema_path, "r", encoding="utf-8") as f:
|
||||
schema_dict = yaml.safe_load(f)
|
||||
schemas = schema_dict.get(tool_name) or dict(schema_dict.values())
|
||||
schemas = schema_dict.get(tool_name) or list(schema_dict.values())[0]
|
||||
schemas["tool_path"] = tool_path # corresponding code file path of the tool
|
||||
try:
|
||||
ToolSchema(**schemas) # validation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue