This commit is contained in:
SengokuCola
2025-04-24 14:19:26 +08:00
parent f8450f705a
commit 3075664480
13 changed files with 224 additions and 225 deletions

View File

@@ -81,13 +81,22 @@ class PromptBuilder:
self.activate_messages = ""
async def build_prompt(
self, build_mode, reason, current_mind_info, structured_info, message_txt: str, sender_name: str = "某人", chat_stream=None
self,
build_mode,
reason,
current_mind_info,
structured_info,
message_txt: str,
sender_name: str = "某人",
chat_stream=None,
) -> Optional[tuple[str, str]]:
if build_mode == "normal":
return await self._build_prompt_normal(chat_stream, message_txt, sender_name)
elif build_mode == "focus":
return await self._build_prompt_focus(reason, current_mind_info, structured_info, chat_stream, message_txt, sender_name)
return await self._build_prompt_focus(
reason, current_mind_info, structured_info, chat_stream, message_txt, sender_name
)
return None
async def _build_prompt_focus(