style: format codes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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} 已被禁用。")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user