添加聊天机器人提示
开发环境
开发环境
POST
/api/v0/chatbots/{chatbotId}/settings/prompts
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/api/v0/chatbots//settings/prompts' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "<string>",
"description": "<string>",
"instructions": "<string>",
"temperature": "<string>"
}'
响应示例响应示例
200 - 成功示例
{
"success": true,
"message": "Added a custom prompt to the chatbot successfully",
"data": {
"prompt": {
"id": "c50191ee-85d0-4f46-9448-3ab74441c9fb",
"title": "Random",
"description": "Prompt for random replies",
"instructions": "You are an AI assistant who provides random answers for all the questions asked.",
"temperature": 0.99
}
}
}
请求参数
Path 参数
chatbotId
string
必需
Header 参数
Authorization
string
必需
示例值:
Bearer <token>
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
返回响应
修改于 2024-03-28 07:53:10