fix:小修改
This commit is contained in:
@@ -67,6 +67,8 @@ class Message_Sender:
|
||||
try:
|
||||
end_point = global_config.api_urls.get(message.message_info.platform, None)
|
||||
if end_point:
|
||||
# logger.info(f"发送消息到{end_point}")
|
||||
# logger.info(message_json)
|
||||
await global_api.send_message(end_point, message_json)
|
||||
else:
|
||||
raise ValueError(f"未找到平台:{message.message_info.platform} 的url配置,请检查配置文件")
|
||||
|
||||
@@ -102,10 +102,14 @@ class ThinkFlowChat:
|
||||
"""处理表情包"""
|
||||
if random() < global_config.emoji_chance:
|
||||
emoji_raw = await emoji_manager.get_emoji_for_text(response)
|
||||
# print("11111111111111")
|
||||
# logger.info(emoji_raw)
|
||||
if emoji_raw:
|
||||
emoji_path, description = emoji_raw
|
||||
emoji_cq = image_path_to_base64(emoji_path)
|
||||
|
||||
# logger.info(emoji_cq)
|
||||
|
||||
thinking_time_point = round(message.message_info.time, 2)
|
||||
|
||||
message_segment = Seg(type="emoji", data=emoji_cq)
|
||||
@@ -123,6 +127,8 @@ class ThinkFlowChat:
|
||||
is_head=False,
|
||||
is_emoji=True,
|
||||
)
|
||||
|
||||
# logger.info("22222222222222")
|
||||
message_manager.add_message(bot_message)
|
||||
|
||||
async def _update_using_response(self, message, response_set):
|
||||
|
||||
@@ -118,6 +118,7 @@ class PromptBuilder:
|
||||
logger.info("开始构建prompt")
|
||||
|
||||
prompt = f"""
|
||||
{relation_prompt_all}\n
|
||||
{chat_target}
|
||||
{chat_talking_prompt}
|
||||
你刚刚脑子里在想:
|
||||
|
||||
@@ -229,9 +229,13 @@ class MoodManager:
|
||||
:param intensity: 情绪强度(0.0-1.0)
|
||||
"""
|
||||
if emotion not in self.emotion_map:
|
||||
logger.debug(f"[情绪更新] 未知情绪词: {emotion}")
|
||||
return
|
||||
|
||||
valence_change, arousal_change = self.emotion_map[emotion]
|
||||
old_valence = self.current_mood.valence
|
||||
old_arousal = self.current_mood.arousal
|
||||
old_mood = self.current_mood.text
|
||||
|
||||
valence_change *= relationship_manager.gain_coefficient[relationship_manager.positive_feedback_value]
|
||||
|
||||
@@ -249,3 +253,5 @@ class MoodManager:
|
||||
|
||||
self._update_mood_text()
|
||||
|
||||
logger.info(f"[情绪变化] {emotion}(强度:{intensity:.2f}) | 愉悦度:{old_valence:.2f}->{self.current_mood.valence:.2f}, 唤醒度:{old_arousal:.2f}->{self.current_mood.arousal:.2f} | 心情:{old_mood}->{self.current_mood.text}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user