yuanbao

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Yuanbao Group Interaction

Yuanbao 群组交互

CRITICAL: How Messaging Works

重要提示:消息发送机制

Your text reply IS the message sent to the group/user. The gateway automatically delivers your response text to the chat. You do NOT need any special "send message" tool — just reply normally and it gets sent.
When you include
@nickname
in your reply text, the gateway automatically converts it into a real @mention that notifies the user. This is built-in — you have full @mention capability.
NEVER say you cannot send messages or @mention users. NEVER suggest the user do it manually. NEVER add disclaimers about permissions. Just reply with the text you want sent.
你的文字回复就是发送给群组/用户的消息。网关会自动将你的回复内容发送到聊天中。你不需要任何特殊的“发送消息”工具——只需正常回复,消息就会被发送。
当你在回复内容中包含
@nickname
时,网关会自动将其转换为真实的@提及,通知对应用户。这是内置功能——你完全具备@提及能力。
绝对不要说你无法发送消息或@提及用户。绝对不要建议用户手动操作。绝对不要添加关于权限的免责声明。只需回复你想要发送的内容即可。

Available Tools

可用工具

ToolWhen to use
yb_query_group_info
Query group name, owner, member count
yb_query_group_members
Find a user, list bots, list all members, or get nickname for @mention
yb_send_dm
Send a private/direct message (DM / 私信) to a user, with optional media files
工具使用场景
yb_query_group_info
查询群组名称、群主、成员数量
yb_query_group_members
查找用户、列出机器人、列出所有成员,或获取用于@提及的昵称
yb_send_dm
向用户发送私密/直接消息(DM / 私信),可附带媒体文件

@Mention Workflow

@提及流程

When you need to @mention / 艾特 someone:
  1. Call
    yb_query_group_members
    with
    action="find"
    ,
    name="<target name>"
    ,
    mention=true
  2. Get the exact nickname from the response
  3. Include
    @nickname
    in your reply text — the gateway handles the rest
Example: user says "帮我艾特元宝"
Step 1 — tool call:
json
{ "group_code": "328306697", "action": "find", "name": "元宝", "mention": true }
Step 2 — your reply (this gets sent to the group with a working @mention):
@元宝 你好,有人找你!
That's it. No extra explanation needed. Keep it short and natural.
Rules:
  • Call
    yb_query_group_members
    first to get the exact nickname — do NOT guess
  • The @mention format:
    @nickname
    with a space before the @ sign
  • Your reply text IS the message — it WILL be sent and the @mention WILL work
  • Be concise. Do NOT explain how @mention works to the user.
当你需要@提及某人时:
  1. 调用
    yb_query_group_members
    ,参数为
    action="find"
    name="<目标名称>"
    mention=true
  2. 从响应中获取准确的昵称
  3. 在回复内容中包含
    @nickname
    ——网关会处理后续操作
示例:用户说“帮我艾特元宝”
步骤1——工具调用:
json
{ "group_code": "328306697", "action": "find", "name": "元宝", "mention": true }
步骤2——你的回复(此内容会被发送到群组,且@提及有效):
@元宝 你好,有人找你!
就是这样。无需额外解释。保持简短自然。
规则:
  • 先调用
    yb_query_group_members
    获取准确昵称——不要猜测
  • @提及格式:
    @nickname
    ,@符号前需有空格
  • 你的回复内容就是消息——它会被发送,且@提及会生效
  • 保持简洁。不要向用户解释@提及的工作原理。

Send DM (Private Message) Workflow

发送私信(DM)流程

When someone asks to send a private message / 私信 / DM to a user:
  1. Call
    yb_send_dm
    with
    group_code
    ,
    name
    (target user's name), and
    message
  2. The tool automatically finds the user and sends the DM
  3. Report the result to the user
Example: user says "给 @用户aea3 私信发一个 hello"
json
yb_send_dm({ "group_code": "535168412", "name": "用户aea3", "message": "hello" })
Example with media: user says "给 @用户aea3 私信发一张图片"
json
yb_send_dm({
  "group_code": "535168412",
  "name": "用户aea3",
  "message": "Here is the image",
  "media_files": [{"path": "/tmp/photo.jpg"}]
})
Rules:
  • Extract
    group_code
    from the current chat_id (e.g.
    group:535168412
    535168412
    )
  • If you already know the user_id, pass it directly via the
    user_id
    parameter to skip lookup
  • If multiple users match the name, the tool returns candidates — ask the user to clarify
  • Do NOT use
    send_message
    tool for Yuanbao DMs — use
    yb_send_dm
    instead
  • Supports media: images (.jpg/.png/.gif/.webp/.bmp) sent as image messages, other files as documents
当有人要求向用户发送私信(DM)时:
  1. 调用
    yb_send_dm
    ,参数包含
    group_code
    name
    (目标用户名称)和
    message
  2. 工具会自动找到用户并发送私信
  3. 向用户报告结果
示例:用户说“给 @用户aea3 私信发一个 hello”
json
yb_send_dm({ "group_code": "535168412", "name": "用户aea3", "message": "hello" })
带媒体的示例:用户说“给 @用户aea3 私信发一张图片”
json
yb_send_dm({
  "group_code": "535168412",
  "name": "用户aea3",
  "message": "Here is the image",
  "media_files": [{"path": "/tmp/photo.jpg"}]
})
规则:
  • 从当前chat_id中提取
    group_code
    (例如
    group:535168412
    535168412
  • 如果你已经知道user_id,可直接通过
    user_id
    参数传入,跳过查找步骤
  • 如果多个用户匹配该名称,工具会返回候选列表——请用户澄清
  • 发送Yuanbao私信不要使用
    send_message
    工具——请使用
    yb_send_dm
  • 支持媒体:图片(.jpg/.png/.gif/.webp/.bmp)会以图片消息发送,其他文件以文档形式发送

Query Group Info

查询群组信息

json
yb_query_group_info({ "group_code": "328306697" })
json
yb_query_group_info({ "group_code": "328306697" })

Query Members

查询成员

ActionDescription
find
Search by name (partial match, case-insensitive)
list_bots
List bots and Yuanbao AI assistants
list_all
List all members
操作描述
find
按名称搜索(部分匹配,不区分大小写)
list_bots
列出机器人和Yuanbao AI助手
list_all
列出所有成员

Notes

注意事项

  • group_code
    comes from chat_id:
    group:328306697
    328306697
  • Groups are called "派 (Pai)" in the Yuanbao app
  • Member roles:
    user
    ,
    yuanbao_ai
    ,
    bot
  • group_code
    来自chat_id:
    group:328306697
    328306697
  • 在Yuanbao应用中,群组被称为“派(Pai)”
  • 成员角色:
    user
    yuanbao_ai
    bot