mirror of
https://github.com/FuQuan233/nonebot-plugin-llmchat.git
synced 2026-02-06 03:58:21 +00:00
✨ 新增内置OneBot工具支持,包括禁言、获取群信息等功能,并优化工具调用逻辑
This commit is contained in:
parent
b4f7b2797c
commit
63e446d5e4
4 changed files with 267 additions and 4 deletions
|
|
@ -381,8 +381,13 @@ async def process_messages(group_id: int):
|
|||
# 发送工具调用提示
|
||||
await handler.send(Message(f"正在使用{mcp_client.get_friendly_name(tool_name)}"))
|
||||
|
||||
# 执行工具调用
|
||||
result = await mcp_client.call_tool(tool_name, tool_args)
|
||||
# 执行工具调用,传递群组和机器人信息用于QQ工具
|
||||
result = await mcp_client.call_tool(
|
||||
tool_name,
|
||||
tool_args,
|
||||
group_id=event.group_id,
|
||||
bot_id=str(event.self_id)
|
||||
)
|
||||
|
||||
new_messages.append({
|
||||
"role": "tool",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue