From 9906d957d4d38acce639535fe40545980ccf1623 Mon Sep 17 00:00:00 2001 From: liangxinbing <1580466765@qq.com> Date: Fri, 7 Mar 2025 01:19:03 +0800 Subject: [PATCH] update run_flow.py --- run_flow.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/run_flow.py b/run_flow.py index 2663666..66e2db8 100644 --- a/run_flow.py +++ b/run_flow.py @@ -1,20 +1,32 @@ import asyncio -from app.agent import ToolCallAgent +from app.agent.manus import Manus from app.flow.base import FlowType from app.flow.flow_factory import FlowFactory async def run_flow(): - agent = ToolCallAgent() + agent = Manus() - flow = FlowFactory.create_flow( - flow_type=FlowType.PLANNING, - agents=agent, - ) + while True: + try: + prompt = input("Enter your prompt (or 'exit' to quit): ") + if prompt.lower() == "exit": + print("Goodbye!") + break - result = await flow.execute("Create a web app that shows Japan travel destinations") - print(result) + flow = FlowFactory.create_flow( + flow_type=FlowType.PLANNING, + agents=agent, + ) + + print("Processing your request...") + result = await flow.execute(prompt) + print(result) + + except KeyboardInterrupt: + print("Goodbye!") + break if __name__ == "__main__":