From 7c71f6c9c02e30bbfaaf20f48adb6fd0dd095f6d Mon Sep 17 00:00:00 2001 From: z30057876 Date: Sun, 20 Apr 2025 18:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A1=AB=E5=8F=82output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/scheduler/call/slot/slot.py | 1 + apps/scheduler/executor/step.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/apps/scheduler/call/slot/slot.py b/apps/scheduler/call/slot/slot.py index 1c4455a4a..8c455d338 100644 --- a/apps/scheduler/call/slot/slot.py +++ b/apps/scheduler/call/slot/slot.py @@ -101,6 +101,7 @@ class Slot(CoreCall, input_model=SlotInput, output_model=SlotOutput): ) return slot_data = await self._llm_slot_fill(data.remaining_schema) + slot_data = self._processor.convert_json(slot_data) # 再次检查 remaining_schema = self._processor.check_json(slot_data) diff --git a/apps/scheduler/executor/step.py b/apps/scheduler/executor/step.py index 9ee1dac5b..63ec8d029 100644 --- a/apps/scheduler/executor/step.py +++ b/apps/scheduler/executor/step.py @@ -128,7 +128,12 @@ class StepExecutor(BaseExecutor): async for chunk in iterator: result: SlotOutput = SlotOutput.model_validate(chunk.content) + # 推送填参结果 + self.task.state.status = StepStatus.SUCCESS # type: ignore[arg-type] + await TaskManager.save_task(self.task.id, self.task) await self.push_message(EventType.STEP_OUTPUT.value, result.slot_data) + + # 更新输入 self.obj.input.update(result.slot_data) # 恢复State -- Gitee