插件功能(plugins)
开发环境
开发环境
POST
https://api.minimax.chat/v1/text/chatcompletion_pro
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.minimax.chat/v1/text/chatcompletion_pro?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"model": "abab5.5-chat",
"stream": false,
"tokens_to_generate": 1024,
"messages": [
{
"sender_type": "USER",
"sender_name": "小明",
"text": "查询明天上海天气"
}
],
"bot_setting": [
{
"bot_name": "MM助手",
"content": "MM助手是minimax开发的AI助手"
}
],
"reply_constraints": {
"sender_type": "BOT",
"sender_name": "MM助手"
},
"plugins": [
"plugin_web_search"
]
}'
响应示例响应示例
{
"created": 0,
"model": "string",
"reply": "string",
"choices": [
{
"finish_reason": "string",
"messages": [
{
"sender_type": "string",
"sender_name": "string",
"text": "string",
"function_call": {
"name": "string",
"arguments": "string"
}
}
]
}
],
"usage": {
"total_tokens": 0,
"tokens_with_added_plugin": 0
},
"input_sensitive": true,
"output_sensitive": true,
"id": "string",
"base_resp": {
"status_code": 0,
"status_msg": "string"
}
}
请求参数
Header 参数
Authorization
string
可选
Content-Type
string
可选
Body 参数application/json
返回响应
修改于 2024-01-03 07:23:13