模板id获取方式:在提示工程模块点击对应的模板,点击复制模板ID
该API为纯渲染API,后续请求需要将prompt字段的内容进行后续的大模型基础接口调用
下载地址(基于nodejs):prompt_template_v1.zip
{ "title": "模版标题", "arg": "模版参数测试" }
curl --location -g --request POST 'https://api.listenai.com/v1/prompt-template/{{api_id}}/render' \ --header 'Authorization: Bearer {{token}}' \ --header 'Content-Type: application/json' \ --data-raw '{ "title": "模版标题", "arg": "模版参数测试" }'
{ "template_id": 1, "prompt": "this is a template prompt 模版标题, use this argument 模版参数测试 for render" }