添加一点注释
This commit is contained in:
@@ -339,24 +339,11 @@ class ChatBot:
|
||||
)
|
||||
message_manager.add_message(bot_message)
|
||||
|
||||
stance,emotion = await self.gpt._get_emotion_tags(raw_content,message.processed_plain_text)
|
||||
# 获取立场和情感标签,更新关系值
|
||||
stance, emotion = await self.gpt._get_emotion_tags(raw_content, message.processed_plain_text)
|
||||
logger.debug(f"为 '{response}' 立场为:{stance} 获取到的情感标签为:{emotion}")
|
||||
await relationship_manager.calculate_update_relationship_value(chat_stream=chat, label=emotion, stance=stance)
|
||||
|
||||
# emotion = await self.gpt._get_emotion_tags(raw_content)
|
||||
# logger.debug(f"为 '{response}' 获取到的情感标签为:{emotion}")
|
||||
# valuedict = {
|
||||
# "happy": 0.5,
|
||||
# "angry": -1,
|
||||
# "sad": -0.5,
|
||||
# "surprised": 0.2,
|
||||
# "disgusted": -1.5,
|
||||
# "fearful": -0.7,
|
||||
# "neutral": 0.1,
|
||||
# }
|
||||
# await relationship_manager.update_relationship_value(
|
||||
# chat_stream=chat, relationship_value=valuedict[emotion[0]]
|
||||
# )
|
||||
# 使用情绪管理器更新情绪
|
||||
self.mood_manager.update_mood_from_emotion(emotion[0], global_config.mood_intensity_factor)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user