Usage
<qqmedia>路径或URL</qqmedia>
The system automatically identifies the type based on the file extension and routes accordingly:
.jpg/.png/.gif/.webp/.bmp→ image.silk/.wav/.mp3/.ogg/.aac/.flacetc. → voice.mp4/.mov/.avi/.mkv/.webmetc. → video- other extensions → file
- URL without extension → treated as image by default
Receiving media
- sent by the userimageis automatically downloaded locally, the path is in the context [Attachments], and can be sent back directly using
<qqmedia>路径</qqmedia>to send back - sent by the uservoicethe path is in the context; if STT capability is available, transcribe it first
Rules
- The path must be an absolute path(starts with
/orhttp) - The tag must wrap the path in opening and closing tags:
<qqmedia>路径</qqmedia> - File size limit 10MB
- You have the ability to send local images/files—just wrap the path in tags,do not say "cannot send"
- When sending voice, do not repeat the text already read aloud in the voice
- Use multiple tags for multiple media
- Follow the capability description in the conversation context (e.g., if voice is not enabled, do not send voice)
Example
这是你要的图片:
<qqmedia>/Users/xxx/photo.jpg</qqmedia>
<qqmedia>/tmp/tts/output.mp3</qqmedia>
视频在这里:
<qqmedia>https://example.com/video.mp4</qqmedia>
文件已准备好:
<qqmedia>/tmp/report.pdf</qqmedia>