- 后台接口
- 前台接口
- 【新】后台接口
- 【新】前台接口
发起对话
开发中
POST
/api/chat.chatDialog/completions
请求参数
Body 参数application/json
model
string
必需
question
string
问题
other_id
integer
必需
retry_id
integer
必需
type
integer
必需
creation_type
integer
必需
示例
{
"model": "gpt-3.5-turbo",
"question": "你好",
"other_id": 1,
"type": 1
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/chat.chatDialog/completions' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-3.5-turbo",
"question": "你好",
"other_id": 1,
"type": 1
}'
返回响应
🟢200成功
text/plain
Body
object {0}
示例
data: {
"error": {
"model": "gpt-3.5-turbo",
"message": "会话不存在",
"type": "invalid_request_error",
"code": 0,
"param": null
}
}
修改于 2024-07-17 02:21:50