better:统一化聊天记录获取和格式化接口,修改分割函数

This commit is contained in:
SengokuCola
2025-04-20 23:39:06 +08:00
parent 5c26c40cb4
commit 4888ab65a7
19 changed files with 851 additions and 1591 deletions

View File

@@ -216,7 +216,7 @@ class Heartflow:
return response
def create_subheartflow(self, subheartflow_id):
async def create_subheartflow(self, subheartflow_id):
"""
创建一个新的SubHeartflow实例
添加一个SubHeartflow实例到self._subheartflows字典中
@@ -229,6 +229,7 @@ class Heartflow:
# 创建一个观察对象目前只可以用chat_id创建观察对象
logger.debug(f"创建 observation: {subheartflow_id}")
observation = ChattingObservation(subheartflow_id)
await observation.initialize()
subheartflow.add_observation(observation)
logger.debug("添加 observation 成功")
# 创建异步任务