This commit is contained in:
SengokuCola
2025-05-28 22:24:12 +08:00
3 changed files with 6 additions and 23 deletions

View File

@@ -115,7 +115,6 @@ class PromptBuilder:
mood_prompt = mood_manager.get_mood_prompt()
(
learnt_style_expressions,
learnt_grammar_expressions,
@@ -147,9 +146,6 @@ class PromptBuilder:
style_habbits_str = "\n".join(style_habbits)
grammar_habbits_str = "\n".join(grammar_habbits)
reply_styles2 = [
("不要回复的太有条理,可以有个性", 0.6),
("不要回复的太有条理,可以复读", 0.15),
@@ -307,6 +303,7 @@ class PromptBuilder:
logger.error(f"获取知识库内容时发生异常: {str(e)}")
return "未检索到知识"
def weighted_sample_no_replacement(items, weights, k) -> list:
"""
加权且不放回地随机抽取k个元素。

View File

@@ -15,7 +15,7 @@ version = "2.6.0"
[bot]
qq_account = 1145141919810
nickname = "麦麦"
alias_names = ["麦叠", "牢麦"] #仅在 专注聊天 有效
alias_names = ["麦叠", "牢麦"]
[personality]
personality_core = "是一个积极向上的女大学生" # 建议50字以内

View File

@@ -1,20 +1,6 @@
HOST=127.0.0.1
PORT=8000
# 默认配置
# 如果工作在Docker下请改成 MONGODB_HOST=mongodb
MONGODB_HOST=127.0.0.1
MONGODB_PORT=27017
DATABASE_NAME=MegBot
# 也可以使用 URI 连接数据库(优先级比上面的高)
# MONGODB_URI=mongodb://127.0.0.1:27017/MegBot
# MongoDB 认证信息,若需要认证,请取消注释以下三行并填写正确的信息
# MONGODB_USERNAME=user
# MONGODB_PASSWORD=password
# MONGODB_AUTH_SOURCE=admin
#key and url
CHAT_ANY_WHERE_BASE_URL=https://api.chatanywhere.tech/v1
SILICONFLOW_BASE_URL=https://api.siliconflow.cn/v1/