AgentEra / Agently-Daily-News-Collector

An open-source LLM based automatically daily news collecting workflow showcase powered by Agently AI application development framework.
http://agently.tech
Apache License 2.0
423 stars 70 forks source link

asyncio.run() cannot be called from a running event loop #13

Open zencorn opened 3 months ago

zencorn commented 3 months ago

安装成功后,启动程序报以下错误! 个人配置的OpenAI代理地址测试连通无误,可以工作。麻烦看下是否是程序内部异常,谢谢!

Maplemx commented 3 months ago

这可能是因为安装了3.3.0.0的包导致的,可以暂时回退到3.2.2.11版本,因为3.3.0.0版本workflow内核运行部分全面调整为异步,和之前的日报项目实现逻辑有冲突,我很快会更新兼容3.3.0.0版本和3.2.2.11版本的方案

Maplemx commented 3 months ago

pip install Agently==3.2.2.11

zencorn commented 3 months ago

pip install Agently==3.2.2.11

感谢回复,降了一个版本,但还有新的异常报出如下:

(AgentNews) D:\CodeProject\Agently-Daily-News-Collector>python app.py

2024-06-17 22:57:18,486 [INFO] [Outline Generated] {'report_title': 'Global Reactions to U.S. Interest Rate Cuts', 'column_list': [{'column_title': 'Economic Impacts of U.S. Rate Cuts', 'column_requirement': 'Discuss the immediate and long-term economic effects of U.S. interest rate reductions, including impacts on inflation, employment, and GDP.', 'search_keywords': '美元降息 economic impacts interest rate cuts'}, {'column_title': 'Global Market Reactions', 'column_requirement': 'Analyze how global financial markets have responded to U.S. interest rate cuts, focusing on stock markets, bond yields, and currency exchanges.', 'search_keywords': '美元降息 global markets stocks bonds forex'}, {'column_title': 'Policy Responses Worldwide', 'column_requireiremenqut': 'Explore the policy adjustments or reactions from different countries or economic blocs in response to the U.S. interest rate cuts.', 'search_keywords': '美元降息 policy responses central banks'}]} 2024-06-17 22:57:23,486 [INFO] [Start Generate Column] Economic Impacts of U.S. Rate Cuts 2024-06-17 22:57:25,153 [INFO] [Search News Count] 0 2024-06-17 22:57:25,153 [INFO] [Picked News Count] 0 2024-06-17 22:57:25,153 [INFO] [Start Generate Column] Global Market Reactions 2024-06-17 22:57:26,944 [INFO] [Search News Count] 0 2024-06-17 22:57:26,944 [INFO] [Picked News Count] 0 2024-06-17 22:57:26,944 [INFO] [Start Generate Column] Policy Responses Worldwide 2024-06-17 22:57:28,546 [INFO] [Search News Count] 3 2024-06-17 22:57:28,546 - ERROR - Node Execution Exception: 'pick_news'(aee9222b-2def-4fd6-98aa-4a301def0460) 'column_requirement' 2024-06-17 22:57:28,546 - ERROR - Node Execution Exception: 'generate_columns'(d17f5523-5430-4018-b05f-595aa8173857) 'column_requirement' Traceback (most recent call last): File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 266, in _exec_chunk_with_dep_core exec_res = chunk_executor(deps_dict, self.store) File "D:\CodeProject\Agently-Daily-News-Collector\workflows\column_workflow.py", line 44, in pick_news_executor "column_requirement": column_outline["column_requirement"], KeyError: 'column_requirement'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 266, in _exec_chunk_with_dep_core exec_res = chunk_executor(deps_dict, self.store) File "D:\CodeProject\Agently-Daily-News-Collector\workflows\main_workflow.py", line 58, in generate_columns_executor column_data = start_column_workflow( File "D:\CodeProject\Agently-Daily-News-Collector\workflows\column_workflow.py", line 152, in start column_workflow.start() File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\Workflow.py", line 67, in start self.executor.start(runtime_data) File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 33, in start self._execute_main(entries) File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 70, in _execute_main self._execute_partial( File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 108, in _execute_partial child_executed = self._execute_single_chunk( File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 165, in _execute_single_chunk self._execute_single_chunk_core( File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 194, in _execute_single_chunk_core exec_value = self._exec_chunk_with_dep_core(chunk, single_dep_map) File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 270, in _exec_chunk_with_dep_core raise Exception(e) Exception: 'column_requirement'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\CodeProject\Agently-Daily-News-Collector\app.py", line 21, in main_workflow.start( File "D:\CodeProject\Agently-Daily-News-Collector\workflows\main_workflow.py", line 109, in start main_workflow.start() File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\Workflow.py", line 67, in start self.executor.start(runtime_data) File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 33, in start self._execute_main(entries) File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 70, in _execute_main self._execute_partial( File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 108, in _execute_partial child_executed = self._execute_single_chunk( File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 165, in _execute_single_chunk self._execute_single_chunk_core( File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 194, in _execute_single_chunk_core exec_value = self._exec_chunk_with_dep_core(chunk, single_dep_map) File "C:\Users\weiji.conda\envs\AgentNews\lib\site-packages\Agently\Workflow\MainExecutor.py", line 270, in _exec_chunk_with_dep_core raise Exception(e) Exception: 'column_requirement'

Maplemx commented 3 months ago

'column_requireiremenqut': 'Explore the policy adjustments or reactions from different countries or economic blocs in response to the U.S. interest rate cuts.'

从输出的结果看,这个地方的字段名生成出错了,重试仍然有问题的话,可能要考虑更换模型