mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-27 17:56:23 +02:00
fixbug: skill_yaml_file_name
This commit is contained in:
parent
2574ecaecf
commit
f33af9dbc9
1 changed files with 4 additions and 3 deletions
|
|
@ -32,9 +32,10 @@ class SkillsDeclaration(BaseModel):
|
|||
|
||||
|
||||
class SkillLoader:
|
||||
def __init__(self):
|
||||
skill_file_name = Path(__file__).parent.parent.parent / ".well-known/skills.yaml"
|
||||
with open(str(skill_file_name), 'r') as file:
|
||||
def __init__(self, skill_yaml_file_name: Path = None):
|
||||
if not skill_yaml_file_name:
|
||||
skill_yaml_file_name = Path(__file__).parent.parent.parent / ".well-known/skills.yaml"
|
||||
with open(str(skill_yaml_file_name), 'r') as file:
|
||||
skills = yaml.safe_load(file)
|
||||
self._skills = SkillsDeclaration(**skills)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue