mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-22 04:16:07 +00:00
style(format): fix ruff formatting issues
This commit is contained in:
@@ -97,7 +97,13 @@ class WebSocketAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter)
|
|||||||
target_id: str,
|
target_id: str,
|
||||||
message: platform_message.MessageChain,
|
message: platform_message.MessageChain,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
"""发送消息 - 这里用于主动推送消息到前端"""
|
"""发送消息 - 这里用于主动推送消息到前端
|
||||||
|
|
||||||
|
对于 WebSocket 适配器,我们需要将消息广播到正确的 pipeline 连接。
|
||||||
|
target_id 可能是 launcher_id(如 websocket_xxx)或 pipeline_uuid。
|
||||||
|
我们需要尝试两种方式来确保消息能够送达。
|
||||||
|
"""
|
||||||
|
# 获取当前的 pipeline_uuid
|
||||||
pipeline_uuid = self.ap.platform_mgr.websocket_proxy_bot.bot_entity.use_pipeline_uuid
|
pipeline_uuid = self.ap.platform_mgr.websocket_proxy_bot.bot_entity.use_pipeline_uuid
|
||||||
session_type = 'group' if target_type == 'group' else 'person'
|
session_type = 'group' if target_type == 'group' else 'person'
|
||||||
|
|
||||||
|
|||||||
@@ -344,10 +344,7 @@ class RuntimeConnectionHandler(handler.Handler):
|
|||||||
async def _placeholder_func(**kwargs):
|
async def _placeholder_func(**kwargs):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
funcs_obj = [
|
funcs_obj = [resource_tool.LLMTool.model_validate({**func, 'func': _placeholder_func}) for func in funcs]
|
||||||
resource_tool.LLMTool.model_validate({**func, 'func': _placeholder_func})
|
|
||||||
for func in funcs
|
|
||||||
]
|
|
||||||
|
|
||||||
result = await llm_model.provider.invoke_llm(
|
result = await llm_model.provider.invoke_llm(
|
||||||
query=None,
|
query=None,
|
||||||
|
|||||||
Reference in New Issue
Block a user