From 2241f25e384a8f884996dc73ecab886aa8187dbe Mon Sep 17 00:00:00 2001 From: Bakadax Date: Thu, 15 May 2025 13:37:50 +0800 Subject: [PATCH] =?UTF-8?q?prompt=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Legacy_HFC/heartflow_prompt_builder.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/experimental/Legacy_HFC/heartflow_prompt_builder.py b/src/experimental/Legacy_HFC/heartflow_prompt_builder.py index adbdcb5e..1877c2e9 100644 --- a/src/experimental/Legacy_HFC/heartflow_prompt_builder.py +++ b/src/experimental/Legacy_HFC/heartflow_prompt_builder.py @@ -260,6 +260,10 @@ async def _build_prompt_focus(reason, current_mind_info, structured_info, chat_s style_habbits_str = "" grammar_habbits_str = "" prompt_ger = "" + if random.random() < 0.60: + prompt_ger += "**不用输出对方的网名或绰号**" + if random.random() < 0.00: + prompt_ger += "你喜欢用反问句" if is_group_chat and global_config.enable_expression_learner: # 从/data/expression/对应chat_id/expressions.json中读取表达方式 ( @@ -293,12 +297,6 @@ async def _build_prompt_focus(reason, current_mind_info, structured_info, chat_s style_habbits_str = "\n你可以参考以下的语言习惯,如果情景合适就使用,不要盲目使用,不要生硬使用,而是结合到表达中:\n".join(style_habbits) grammar_habbits_str = "\n请你根据情景使用以下句法:\n".join(grammar_habbits) else: - prompt_ger = "" - if random.random() < 0.60: - prompt_ger += "**不用输出对方的网名或绰号**" - if random.random() < 0.00: - prompt_ger += "你喜欢用反问句" - reply_styles1 = [ ("给出日常且口语化的回复,平淡一些", 0.40), ("给出非常简短的回复", 0.30),