https://chat.xutongbao.top/api/light/chat/createChatCompletion
post
model可选值:
“gpt-3.5-turbo-1106”、 “gpt-3.5-turbo-16k” 、 “gpt-4”、“gpt-4-1106-preview”。 默认值为: “gpt-3.5-turbo-1106”
token获取方式:
访问:https://chat.xutongbao.top/
使用邮箱注册账号
点击【我的】
点击【API】
{
"model": "gpt-3.5-turbo-1106",
"token": "sk-3d76d415-dd72-43ff-b7c8-65fb426f1d7b",
"messages": [
{
"role": "user",
"content": "你好"
}
],
"params": {
"n": 1
}
}
{
"code": 200,
"data": {
"completion": {
"id": "chatcmpl-8JGls95QfaJp8WI9oirVRqK7SMY8h",
"object": "chat.completion",
"created": 1699603392,
"model": "gpt-3.5-turbo-1106",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!有什么可以帮助你的吗?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 17,
"total_tokens": 26
},
"system_fingerprint": "fp_eeff13170a"
},
"info": {
"isSdHide": "2",
"sdLimitCount": 2000,
"sdTextToImg": 411,
"token": "sk-3d76d415-dd72-43ff-b7c8-65fb426f1d7b",
"numOfOneDayCanCallApi": 10,
"numOfOneDayAlreadyCallApi": 3,
"apiDate": "2023-11-10"
}
},
"message": "成功"
}
更多【gpt-ChatGPT、GPT-4 Turbo接口调用】相关视频教程:www.yxfzedu.com