From 784ff2021b2fe3db331907a168570576d46c3179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E5=8D=9A?= <1016318004@qq.com> Date: Tue, 11 Feb 2025 19:22:24 +0800 Subject: [PATCH] fix bug --- apps/entities/collection.py | 2 +- apps/scheduler/scheduler/scheduler.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/entities/collection.py b/apps/entities/collection.py index 48a3bfbd..e8de8eca 100644 --- a/apps/entities/collection.py +++ b/apps/entities/collection.py @@ -71,7 +71,7 @@ class Conversation(BaseModel): title: str = NEW_CHAT created_at: float = Field(default_factory=lambda: round(datetime.now(tz=timezone.utc).timestamp(), 3)) is_debug: bool = False - app_id: str + app_id: Optional[str] = Field(default="") tasks: list[str] = [] unused_docs: list[str] = [] record_groups: list[str] = [] diff --git a/apps/scheduler/scheduler/scheduler.py b/apps/scheduler/scheduler/scheduler.py index 1ef67ffe..5dadc6c8 100644 --- a/apps/scheduler/scheduler/scheduler.py +++ b/apps/scheduler/scheduler/scheduler.py @@ -120,16 +120,16 @@ class Scheduler: # 生成推荐问题和事实提取 # 如果需要生成推荐问题,则生成 - if need_recommend: - routine_results = await asyncio.gather( - generate_facts(self._task_id, post_body.question), + # if need_recommend: + # routine_results = await asyncio.gather( + # generate_facts(self._task_id, post_body.question), # plan_next_flow(user_sub, self._task_id, self._queue, post_body.app), - ) - else: - routine_results = await asyncio.gather(generate_facts(self._task_id, post_body.question)) + # ) + # else: + # routine_results = await asyncio.gather(generate_facts(self._task_id, post_body.question)) # 保存事实信息 - self._facts = routine_results[0] + # self._facts = routine_results[0] # 发送结束消息 await self._queue.push_output(event_type=EventType.DONE, data={}) -- Gitee