MCPcopy Create free account
hub / github.com/HKUDS/AutoAgent / async_workflow

Function async_workflow

autoagent/cli.py:93–103  ·  view source on GitHub ↗

异步实现的workflow函数

(workflow_name: str, system_input: str)

Source from the content-addressed store, hash-verified

91 return asyncio.run(async_workflow(workflow_name, system_input))
92
93async def async_workflow(workflow_name: str, system_input: str):
94 """异步实现的workflow函数"""
95 workflow_module = importlib.import_module(f'autoagent.workflows')
96 try:
97 workflow_func = getattr(workflow_module, workflow_name)
98 except AttributeError:
99 raise ValueError(f'Workflow function {workflow_name} not found...')
100
101 result = await workflow_func(system_input) # 使用 await 等待异步函数完成
102 debug_print(True, result, title=f'Result of running {workflow_name} workflow', color='pink3')
103 return result
104
105def clear_screen():
106 console = Console()

Callers 1

workflowFunction · 0.85

Calls 1

debug_printFunction · 0.90

Tested by

no test coverage detected