style: format codes

This commit is contained in:
Soulter
2025-03-08 20:55:25 +08:00
parent 4eef42f730
commit f6dc16f17b
3 changed files with 13 additions and 7 deletions
@@ -138,11 +138,13 @@ class LLMRequestSubStage(Stage):
# 保存到历史记录
await self._save_to_history(event, req, llm_response)
asyncio.create_task(Metric.upload(
llm_tick=1,
model_name=provider.get_model(),
provider_type=provider.meta().type,
))
asyncio.create_task(
Metric.upload(
llm_tick=1,
model_name=provider.get_model(),
provider_type=provider.meta().type,
)
)
if llm_response.role == "assistant":
# text completion
+3 -1
View File
@@ -197,7 +197,9 @@ class AstrMessageEvent(abc.ABC):
"""
发送消息到消息平台。
"""
asyncio.create_task(Metric.upload(msg_event_tick=1, adapter_name=self.platform_meta.name))
asyncio.create_task(
Metric.upload(msg_event_tick=1, adapter_name=self.platform_meta.name)
)
self._has_send_oper = True
async def _pre_send(self):
+3 -1
View File
@@ -308,7 +308,9 @@ class PluginManager:
context=self.context
)
else:
metadata.star_cls = metadata.star_cls_type(context=self.context)
metadata.star_cls = metadata.star_cls_type(
context=self.context
)
else:
logger.info(f"插件 {metadata.name} 已被禁用。")