Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

can change timeout through data.yaml

Yizhou Chi2fc8f20de6fb
diff --git a/expo/data.yaml b/expo/data.yaml
index 8273fecad..f1556c519 100644
--- a/expo/data.yaml
+++ b/expo/data.yaml
@@ -1,3 +1,4 @@
datasets_dir: "D:/work/automl/datasets" # path to the datasets directory
work_dir: ../workspace # path to the workspace directory
role_dir: storage/SELA # path to the role directory
+role_timeout: 1000 # timeout for each node/role in seconds
\ No newline at end of file
diff --git a/expo/research_assistant.py b/expo/research_assistant.py
index 8ee7dc204..8fadeb7fb 100644
--- a/expo/research_assistant.py
+++ b/expo/research_assistant.py
@@ -6,7 +6,7 @@ import os
from pydantic import model_validator
-from expo.utils import mcts_logger, save_notebook
+from expo.utils import DATA_CONFIG, mcts_logger, save_notebook
from metagpt.actions.di.write_analysis_code import WriteAnalysisCode
from metagpt.const import SERDESER_PATH
from metagpt.roles.di.data_interpreter import DataInterpreter
@@ -163,7 +163,7 @@ class ResearchAssistant(DataInterpreter):
self.planner.plan.task_map[task_id] for task_id in sorted(self.planner.plan.task_map.keys())
]
- @async_timeout(1000)
+ @async_timeout(DATA_CONFIG["role_timeout"])
@role_raise_decorator
async def run(self, with_message=None) -> Message | None:
"""Observe, and think and act based on the results of the observation"""