better:优化了取得聊天信息和strbuild函数,异步改为同步,优化了observation的加载

This commit is contained in:
SengokuCola
2025-06-04 13:42:19 +08:00
parent 25711e5b88
commit e483d0d94a
27 changed files with 185 additions and 248 deletions

View File

@@ -366,7 +366,7 @@ class ObservationInfo:
# 更新历史记录字符串 (只使用最近一部分生成例如20条)
history_slice_for_str = self.chat_history[-20:]
try:
self.chat_history_str = await build_readable_messages(
self.chat_history_str = build_readable_messages(
history_slice_for_str,
replace_bot_name=True,
merge_messages=False,