🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -139,7 +139,9 @@ class NormalChatExpressor:
|
|||||||
# 提交消息集
|
# 提交消息集
|
||||||
if bot_msg:
|
if bot_msg:
|
||||||
await message_manager.add_message(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
|
container = await message_manager.get_container(self.chat_stream.stream_id) # 使用 self.stream_id
|
||||||
for msg in container.messages[:]:
|
for msg in container.messages[:]:
|
||||||
if isinstance(msg, MessageThinking) and msg.message_info.message_id == thinking_id:
|
if isinstance(msg, MessageThinking) and msg.message_info.message_id == thinking_id:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from typing import Tuple, List, Type
|
|||||||
|
|
||||||
logger = get_logger("tts")
|
logger = get_logger("tts")
|
||||||
|
|
||||||
|
|
||||||
class TTSAction(BaseAction):
|
class TTSAction(BaseAction):
|
||||||
"""TTS语音转换动作处理类"""
|
"""TTS语音转换动作处理类"""
|
||||||
|
|
||||||
@@ -86,6 +87,7 @@ class TTSAction(BaseAction):
|
|||||||
|
|
||||||
return processed_text
|
return processed_text
|
||||||
|
|
||||||
|
|
||||||
@register_plugin
|
@register_plugin
|
||||||
class TTSPlugin(BasePlugin):
|
class TTSPlugin(BasePlugin):
|
||||||
"""TTS插件
|
"""TTS插件
|
||||||
@@ -114,9 +116,7 @@ class TTSPlugin(BasePlugin):
|
|||||||
if enable_tts:
|
if enable_tts:
|
||||||
components.append(
|
components.append(
|
||||||
(
|
(
|
||||||
TTSAction.get_action_info(
|
TTSAction.get_action_info(name="tarots_action", description="文字转语音插件"),
|
||||||
name="tarots_action", description="文字转语音插件"
|
|
||||||
),
|
|
||||||
TTSAction,
|
TTSAction,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user