fix: 增加设置模板,优化emotion,优化压缩

This commit is contained in:
tcmofashi
2025-03-07 01:06:36 +08:00
parent 71e851fbd4
commit 0ebd241077
4 changed files with 9 additions and 31 deletions

View File

@@ -163,12 +163,6 @@ class ChatBot:
message_manager.add_message(message_set)
bot_response_time = tinking_time_point
emotion = await self.gpt._get_emotion_tags(raw_content)
print(f"'{response}' 获取到的情感标签为:{emotion}")
valuedict={
'happy':0.5,'angry':-1,'sad':-0.5,'surprised':0.5,'disgusted':-1.5,'fearful':-0.25,'neutral':0.25
}
await relationship_manager.update_relationship_value(message.user_id, relationship_value=valuedict[emotion[0]])
if random() < global_config.emoji_chance:
emoji_path = await emoji_manager.get_emoji_for_text(response)
@@ -196,6 +190,12 @@ class ChatBot:
# reply_message_id=message.message_id
)
message_manager.add_message(bot_message)
emotion = await self.gpt._get_emotion_tags(raw_content)
print(f"'{response}' 获取到的情感标签为:{emotion}")
valuedict={
'happy':0.5,'angry':-1,'sad':-0.5,'surprised':0.5,'disgusted':-1.5,'fearful':-0.25,'neutral':0.25
}
await relationship_manager.update_relationship_value(message.user_id, relationship_value=valuedict[emotion[0]])
# willing_manager.change_reply_willing_after_sent(event.group_id)