VietQR
Use the bundled script when the user wants a VietQR payment link or markdown QR preview:
CODEBLOCK0
Optional flags:
- -
--amount <positive_int|k_suffix> (examples: 10000, 10k, 25K, 2.5k) - INLINECODE5 also supports Vietnamese shorthand and separators (examples:
200.000, 1,5tr, 2tr, 50k, 500kđ) - INLINECODE11
- INLINECODE12
- INLINECODE13 (default:
compact2) - INLINECODE15 (print
) - INLINECODE17 (print built-in bank aliases like
vcb, mb, bidv, vietinbank)
Workflow:
- 1. Ask only for the missing bank, account, amount, or note fields needed for the user's request.
- Normalize human input before calling the script.
- Convert shorthand amounts like
10k,
2.5k,
1,5tr,
2tr, or
200.000 into whole VND amounts.
- Translate common bank nicknames or abbreviations (including Vietnamese forms with accents) into the bank string the script should receive.
- Prefer using a clear official bank name when there is any ambiguity.
- 3. Run the script instead of hand-building the URL.
- Return the generated URL directly, or the markdown image form when the user wants something they can paste into chat/docs.
- For chat surfaces that do not render markdown images inline, prefer returning the raw URL.
Keep the script layer small and predictable. Do not rely on the script to understand every human shorthand if the agent can normalize it first.
If the script exits with Invalid input: ..., return that reason clearly and ask only for the incorrect field.
VietQR
当用户需要VietQR支付链接或Markdown二维码预览时,使用捆绑脚本:
bash
python3 {baseDir}/scripts/vietqr.py --bank <银行> --account <账号>
可选参数:
- - --amount <正整数|k后缀> (示例:10000、10k、25K、2.5k)
- --amount <越南盾金额> 也支持越南语简写和分隔符(示例:200.000、1,5tr、2tr、50k、500kđ)
- --note <转账备注>
- --account-name <账户持有人>
- --template <模板> (默认:compact2)
- --markdown (输出
) - --list-banks (列出内置银行别名,如 vcb、mb、bidv、vietinbank)
工作流程:
- 1. 仅询问用户请求中缺失的银行、账号、金额或备注字段。
- 在调用脚本前对人工输入进行规范化处理。
- 将 10k、2.5k、1,5tr、2tr 或 200.000 等简写金额转换为完整的越南盾金额。
- 将常见的银行昵称或缩写(包括带声调的越南语形式)转换为脚本应接收的银行字符串。
- 存在歧义时优先使用明确的官方银行名称。
- 3. 运行脚本而非手动构建URL。
- 直接返回生成的URL,或当用户需要可粘贴到聊天/文档中的内容时返回Markdown图片形式。
- 对于不支持内联渲染Markdown图片的聊天界面,优先返回原始URL。
保持脚本层简洁且可预测。如果智能体可以先行规范化,则不要依赖脚本来理解所有人工简写。
如果脚本退出并显示 Invalid input: ...,请清晰返回该原因,并仅询问错误的字段。