mirror of https://github.com/Mai-with-u/MaiBot.git
去掉结尾符,优化群侧写prompt
parent
6a3e58b383
commit
feac1f6dc3
|
|
@ -19,7 +19,7 @@ def init_prompt() -> None:
|
||||||
learn_style_prompt = """
|
learn_style_prompt = """
|
||||||
{chat_str}
|
{chat_str}
|
||||||
|
|
||||||
请从上面这段群聊中概括除了人名为"麦麦"之外的人的语言风格,只考虑文字,不要考虑表情包和图片
|
请从上面这段群聊中概括除了人名为"SELF"之外的人的语言风格,只考虑文字,不要考虑表情包和图片
|
||||||
不要涉及具体的人名,只考虑语言风格
|
不要涉及具体的人名,只考虑语言风格
|
||||||
语言风格包含特殊内容和情感
|
语言风格包含特殊内容和情感
|
||||||
思考有没有特殊的梗,一并总结成语言风格
|
思考有没有特殊的梗,一并总结成语言风格
|
||||||
|
|
@ -57,8 +57,8 @@ def init_prompt() -> None:
|
||||||
learn_grammar_prompt = """
|
learn_grammar_prompt = """
|
||||||
{chat_str}
|
{chat_str}
|
||||||
|
|
||||||
请从上面这段群聊中概括除了人名为"麦麦"之外的人的语法和句法特点,只考虑纯文字,不要考虑表情包和图片
|
请从上面这段群聊中概括除了人名为"SELF"之外的人的语法和句法特点,只考虑纯文字,不要考虑表情包和图片
|
||||||
不要总结【图片】,【动画表情】,[图片],[动画表情],不总结 表情符号 at @ 回复 和[回复]
|
不要总结【图片】,【动画表情】,[图片],[动画表情],[表达了...],不总结 表情符号 at @ 回复 和[回复]
|
||||||
不要涉及具体的人名,只考虑语法和句法特点,
|
不要涉及具体的人名,只考虑语法和句法特点,
|
||||||
语法和句法特点要包括,句子长短(具体字数),有何种语病,如何拆分句子。
|
语法和句法特点要包括,句子长短(具体字数),有何种语病,如何拆分句子。
|
||||||
总结成如下格式的规律,总结的内容要简洁,不浮夸:
|
总结成如下格式的规律,总结的内容要简洁,不浮夸:
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ async def _build_readable_messages_internal(
|
||||||
stripped_line = stripped_line[:-1]
|
stripped_line = stripped_line[:-1]
|
||||||
# 如果内容被截断,结尾已经是 ...(内容太长),不再添加分号
|
# 如果内容被截断,结尾已经是 ...(内容太长),不再添加分号
|
||||||
if not stripped_line.endswith("(内容太长)"):
|
if not stripped_line.endswith("(内容太长)"):
|
||||||
output_lines.append(f"{stripped_line};")
|
output_lines.append(f"{stripped_line}")
|
||||||
else:
|
else:
|
||||||
output_lines.append(stripped_line) # 直接添加截断后的内容
|
output_lines.append(stripped_line) # 直接添加截断后的内容
|
||||||
output_lines.append("\n") # 在每个消息块后添加换行,保持可读性
|
output_lines.append("\n") # 在每个消息块后添加换行,保持可读性
|
||||||
|
|
@ -455,7 +455,7 @@ async def build_anonymous_messages(messages: List[Dict[str, Any]]) -> str:
|
||||||
if stripped_line:
|
if stripped_line:
|
||||||
if stripped_line.endswith("。"):
|
if stripped_line.endswith("。"):
|
||||||
stripped_line = stripped_line[:-1]
|
stripped_line = stripped_line[:-1]
|
||||||
output_lines.append(f"{stripped_line};")
|
output_lines.append(f"{stripped_line}")
|
||||||
output_lines.append("\n")
|
output_lines.append("\n")
|
||||||
|
|
||||||
formatted_string = "".join(output_lines).strip()
|
formatted_string = "".join(output_lines).strip()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue