refactor(maizone): 移除生成文案时对跨群聊上下文的依赖
此更改删除了在生成内容时获取和注入跨群聊上下文(`maizone_context_group`)的逻辑。 该功能已被新的、更通用的 S4U 上下文检索机制所取代,因此旧的硬编码实现不再需要,移除它可以简化代码并消除冗余。
This commit is contained in:
@@ -17,7 +17,6 @@ from src.common.logger import get_logger
|
||||
from src.config.api_ada_configs import TaskConfig
|
||||
from src.llm_models.utils_model import LLMRequest
|
||||
from src.plugin_system.apis import config_api, generator_api, llm_api
|
||||
from src.plugin_system.apis.cross_context_api import get_chat_history_by_group_name
|
||||
|
||||
# 导入旧的工具函数,我们稍后会考虑是否也需要重构它
|
||||
from ..utils.history_utils import get_send_history
|
||||
@@ -88,11 +87,6 @@ class ContentService:
|
||||
if context:
|
||||
prompt += f"\n作为参考,这里有一些最近的聊天记录:\n---\n{context}\n---"
|
||||
|
||||
# 添加跨群聊上下文
|
||||
cross_context = await get_chat_history_by_group_name("maizone_context_group")
|
||||
if cross_context and "找不到名为" not in cross_context:
|
||||
prompt += f"\n\n---跨群聊参考---\n{cross_context}\n---"
|
||||
|
||||
# 添加历史记录以避免重复
|
||||
prompt += "\n\n---历史说说记录---\n"
|
||||
history_block = await get_send_history(qq_account)
|
||||
|
||||
Reference in New Issue
Block a user