- 无界AI企业服务
- 无界AI企业智能客服
- 更新日志
- 公告
- API接入指南
- 作画指南
- AI专业版作画
- AI普通版作画
- AI视频生视频
- AI咒语解析
- 付费开通API
- AI化身&个性相机
- 提升作画效率
- 自定义镜像
- 用户账户
- LLM对话聊天
- 实验室
创建对话
POST
https://gate.wujieai.net/wj-open/v1/chat/completions
LLM对话聊天
请求参数
Body 参数application/json
model
string <enum>
必需
deepseek-ai/DeepSeek-R1、deepseek-ai/DeepSeek-V3
示例值:
deepseek-ai/DeepSeek-R1
messages
array[object (Message_request) {2}]
对话历史消息列表
role
string <string>
交互角色
示例值:
user
content
string <string>
对话内容
示例值:
hello world
max_tokens
integer <int32>
可选
示例值:
512
temperature
number <double>
可选
示例值:
0.7
top_p
number <double>
可选
示例值:
0.7
n
integer <int32>
可选
示例值:
1
stream
boolean
可选
示例值:
true
stop
array[string]
可选
示例值:
uwqmlk,8wh77n
presence_penalty
number <double>
可选
示例值:
68.35
frequency_penalty
number <double>
可选
示例值:
15.68
logit_bias
object
可选
示例
{
"model": "deepseek-ai/DeepSeek-R1",
"messages": [
{
"role": "user",
"content": "hello world"
}
],
"max_tokens": 512,
"temperature": 0.7,
"top_p": 0.7,
"n": 1,
"stream": true,
"stop": [
"rnv853"
],
"presence_penalty": 54.26,
"frequency_penalty": 32.41,
"logit_bias": {
"mapKey": 992
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://gate.wujieai.net/wj-open/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data-raw '{"model":"deepseek-ai/DeepSeek-R1","messages":[{"role":"user","content":"hello world"}],"max_tokens":512,"temperature":0.7,"top_p":0.7,"n":1,"stream":true,"stop":["rnv853"],"presence_penalty":54.26,"frequency_penalty":32.41,"logit_bias":{"mapKey":992}}'
返回响应
🟢200成功
*/*
Body
id
string
必需
object
string
返回对象的类型
created
string
时间戳
choices
array [object {5}]
结果数组
index
string
必需
logprobs
string
必需
finish_reason
string
结束原因
matched_stop
string
匹配到的停止符
delta
object
必需
usage
string
必需
示例
{
"id": "22b1ccf26e4346bba4d5655f1fa20b93",
"object": "chat.completion.chunk",
"created": 1739796748,
"choices": [
{
"index": 0,
"delta": {
"role": null,
"content": "如需",
"tool_calls": null
},
"logprobs": null,
"finish_reason": "",
"matched_stop": null
}
],
"usage": null
}
修改于 2025-02-18 01:52:36