fixbug: no param

This commit is contained in:
莘权 马 2023-09-03 13:46:23 +08:00
parent 0dddab18b4
commit ef98ad4043
2 changed files with 7 additions and 19 deletions

View file

@ -9,14 +9,12 @@
from __future__ import annotations
import ast
import asyncio
import importlib
import traceback
from copy import deepcopy
from metagpt.actions import Action, ActionOutput
from metagpt.config import CONFIG
from metagpt.learn.skill_loader import Returns, Skill
from metagpt.learn.skill_loader import Skill
from metagpt.logs import logger
@ -110,15 +108,3 @@ if __name__ == "__main__":
ArgumentsParingAction.parse_arguments(
skill_name="text_to_image", txt='`text_to_image(text="Draw an apple", size_type="512x512")`'
)
CONFIG.set_context({})
args = {"text": "hello world", "role": "Girl"}
action = SkillAction(
skill=Skill(
name="text_to_speech", description="", id="", arguments={}, examples=[], returns=Returns(type="string")
),
args=args,
)
loop = asyncio.new_event_loop()
t = loop.create_task(action.run())
r = loop.run_until_complete(t)
print(r)