From c81ba86c70e222f02ed8dfb986902194034229d8 Mon Sep 17 00:00:00 2001 From: zxstty Date: Mon, 8 Sep 2025 21:11:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/scheduler/executor/agent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/scheduler/executor/agent.py b/apps/scheduler/executor/agent.py index 743a052e7..184306c33 100644 --- a/apps/scheduler/executor/agent.py +++ b/apps/scheduler/executor/agent.py @@ -256,6 +256,7 @@ class MCPAgentExecutor(BaseExecutor): async def get_next_step(self) -> None: """获取下一步""" + self.task.state.retry_times = 0 if self.task.state.step_cnt < self.max_steps: self.task.state.step_cnt += 1 history = await MCPHost.assemble_memory(self.task) @@ -361,6 +362,7 @@ class MCPAgentExecutor(BaseExecutor): break elif self.task.state.step_status == StepStatus.ERROR: # 错误处理 + self.task.state.retry_times += 1 if self.task.state.retry_times >= 3: await self.error_handle_after_step() else: -- Gitee From 23c098748b3dea1b72e93c5dc72770c9da3a9068 Mon Sep 17 00:00:00 2001 From: zxstty Date: Tue, 9 Sep 2025 09:38:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B5=81=E6=89=A7=E8=A1=8C=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E4=B9=8B=E5=90=8E=E8=BF=9B=E8=A1=8C=E6=80=BB=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/scheduler/executor/agent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/scheduler/executor/agent.py b/apps/scheduler/executor/agent.py index 184306c33..eece51149 100644 --- a/apps/scheduler/executor/agent.py +++ b/apps/scheduler/executor/agent.py @@ -315,6 +315,7 @@ class MCPAgentExecutor(BaseExecutor): output_data={}, ) ) + self.task.state.tool_id = FINAL_TOOL_ID async def work(self) -> None: """执行当前步骤""" -- Gitee From 52ec8e9cf00fe78fb799ad379242eb867021fe51 Mon Sep 17 00:00:00 2001 From: zxstty Date: Tue, 9 Sep 2025 10:40:35 +0800 Subject: [PATCH 3/4] =?UTF-8?q?record=E8=BF=94=E5=9B=9Estep=E7=9A=84id?= =?UTF-8?q?=E5=92=8Cname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/routers/record.py | 3 ++- apps/schemas/record.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/routers/record.py b/apps/routers/record.py index ed994f6fe..663708b86 100644 --- a/apps/routers/record.py +++ b/apps/routers/record.py @@ -96,7 +96,8 @@ async def get_record(conversation_id: str, user_sub: Annotated[str, Depends(get_ for flow_step in flow_step_list: tmp_record.flow.steps.append( RecordFlowStep( - stepId=flow_step.step_name, # TODO: 此处前端应该用name + stepId=flow_step.step_id, + stepName=flow_step.step_name, stepStatus=flow_step.step_status, input=flow_step.input_data, output=flow_step.output_data, diff --git a/apps/schemas/record.py b/apps/schemas/record.py index b6b70dd6f..7f0c79a9e 100644 --- a/apps/schemas/record.py +++ b/apps/schemas/record.py @@ -33,6 +33,7 @@ class RecordFlowStep(BaseModel): """Record表子项:flow的单步数据结构""" step_id: str = Field(alias="stepId") + step_name: str = Field(alias="stepName", default="") step_status: StepStatus = Field(alias="stepStatus") input: dict[str, Any] output: dict[str, Any] -- Gitee From e86b3517892bb986e792cc9d0a85479557edc18c Mon Sep 17 00:00:00 2001 From: zxstty Date: Tue, 9 Sep 2025 10:59:24 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/llm/function.py | 2 +- apps/llm/reasoning.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/llm/function.py b/apps/llm/function.py index 89de7fe35..0d1fbf9a7 100644 --- a/apps/llm/function.py +++ b/apps/llm/function.py @@ -42,7 +42,7 @@ class FunctionLLM: self._params = { "model": self._config.model, "messages": [], - "timeout": 10 + "timeout": 300 } if self._config.backend == "ollama": diff --git a/apps/llm/reasoning.py b/apps/llm/reasoning.py index bc8484904..58c3fd715 100644 --- a/apps/llm/reasoning.py +++ b/apps/llm/reasoning.py @@ -145,7 +145,7 @@ class ReasoningLLM: temperature=temperature or self._config.temperature, stream=True, stream_options={"include_usage": True}, - timeout=10 + timeout=300 ) # type: ignore[] async def call( # noqa: C901, PLR0912, PLR0913 -- Gitee