Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
@@ -114,14 +114,13 @@ class PromptBuilder:
|
||||
relation_prompt += await relationship_manager.build_relationship_info(person)
|
||||
|
||||
mood_prompt = mood_manager.get_mood_prompt()
|
||||
|
||||
|
||||
|
||||
(
|
||||
learnt_style_expressions,
|
||||
learnt_grammar_expressions,
|
||||
personality_expressions,
|
||||
) = await expression_learner.get_expression_by_chat_id(chat_stream.stream_id)
|
||||
|
||||
|
||||
style_habbits = []
|
||||
grammar_habbits = []
|
||||
# 1. learnt_expressions加权随机选2条
|
||||
@@ -146,10 +145,7 @@ class PromptBuilder:
|
||||
|
||||
style_habbits_str = "\n".join(style_habbits)
|
||||
grammar_habbits_str = "\n".join(grammar_habbits)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
reply_styles2 = [
|
||||
("不要回复的太有条理,可以有个性", 0.6),
|
||||
("不要回复的太有条理,可以复读", 0.15),
|
||||
@@ -306,7 +302,8 @@ class PromptBuilder:
|
||||
except Exception as e:
|
||||
logger.error(f"获取知识库内容时发生异常: {str(e)}")
|
||||
return "未检索到知识"
|
||||
|
||||
|
||||
|
||||
def weighted_sample_no_replacement(items, weights, k) -> list:
|
||||
"""
|
||||
加权且不放回地随机抽取k个元素。
|
||||
|
||||
@@ -15,7 +15,7 @@ version = "2.6.0"
|
||||
[bot]
|
||||
qq_account = 1145141919810
|
||||
nickname = "麦麦"
|
||||
alias_names = ["麦叠", "牢麦"] #仅在 专注聊天 有效
|
||||
alias_names = ["麦叠", "牢麦"]
|
||||
|
||||
[personality]
|
||||
personality_core = "是一个积极向上的女大学生" # 建议50字以内
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user