SuperAPI AI 工具集

frevana-gen-report

办公与效率

查看项目

更新于 10-15 20:29

技能介绍

用途:这是一个后端 HTML 生成技能,通过调用 Frevana 的 POST https://api.frevana.com/report/generate 接口,把内容与模板组合成最终 HTML。

主要能力:接收 content(或 content_file)与 template_id,请求体固定为 {"content": ..., "template_id": ..., "target_platform": "generate_auto_formating_content"},其中 target_platform 固定不变。API 返回形如 {"content": "<html>...</html>"} 的 JSON,技能提取 content 字段并作为最终结果输出,不做修改、优化或重写,除非用户明确要求。

使用方式:需要用户提供 content 或 content_file 之一,以及 template_id;需要环境变量 FREVANA_TOKEN,或本次运行显式传入 --token;依赖 curl 与 bash。优先使用脚本而非临时 curl 命令。示例:

bash <skill-path>/scripts/generate_report.sh --content "report content" --template-id "report template id"

bash <skill-path>/scripts/generate_report.sh --content-file ./report-content.md --template-id "report template id"

bash <skill-path>/scripts/generate_report.sh --content-file ./report-content.md --template-id "report template id" --output ./out/frevana-report.html

bash <skill-path>/scripts/generate_report.sh --content "report content" --template-id "report template id" --token "your bearer token"

成功时脚本解析响应 JSON、提取 content 并打印 HTML 到 stdout;带 --output 时同时写入指定文件。失败时打印响应体或解析错误并以非零状态退出。

限制与注意:--content 与 --content-file 必须且只能提供一个;缺少内容或 template_id 时应停止并询问;缺少 curl 或 bash 时应提示安装或改用 Bash 环境;非交互或智能体流程中若缺少 token 应快速失败并提示设置 FREVANA_TOKEN 或传 --token;不要回显 Bearer token;长内容建议用 --content-file。返回的 HTML 是最终结果,应原样传递。