🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-06-14 02:16:34 +00:00
parent d41ae72e0e
commit bc145bc379
2 changed files with 8 additions and 6 deletions

View File

@@ -139,7 +139,9 @@ class NormalChatExpressor:
# 提交消息集
if bot_msg:
await message_manager.add_message(bot_msg)
logger.info(f"{self.log_prefix} 成功发送 {response_type}类型消息: {str(content)[:200] + '...' if len(str(content)) > 200 else content}")
logger.info(
f"{self.log_prefix} 成功发送 {response_type}类型消息: {str(content)[:200] + '...' if len(str(content)) > 200 else content}"
)
container = await message_manager.get_container(self.chat_stream.stream_id) # 使用 self.stream_id
for msg in container.messages[:]:
if isinstance(msg, MessageThinking) and msg.message_info.message_id == thinking_id:

View File

@@ -6,6 +6,7 @@ from typing import Tuple, List, Type
logger = get_logger("tts")
class TTSAction(BaseAction):
"""TTS语音转换动作处理类"""
@@ -86,13 +87,14 @@ class TTSAction(BaseAction):
return processed_text
@register_plugin
class TTSPlugin(BasePlugin):
"""TTS插件
- 这是文字转语音插件
- Normal模式下依靠关键词触发
- Focus模式下由LLM判断触发
- 具有一定的文本预处理能力
- 具有一定的文本预处理能力
"""
# 插件基本信息
@@ -114,11 +116,9 @@ class TTSPlugin(BasePlugin):
if enable_tts:
components.append(
(
TTSAction.get_action_info(
name="tarots_action", description="文字转语音插件"
),
TTSAction.get_action_info(name="tarots_action", description="文字转语音插件"),
TTSAction,
)
)
return components
return components