TODO:
- 弹窗里面的功能:
展示码、按单号查询key、保存key
2. 主屏增加些说明性图文
-
install packages:
pnpm i
-
run as dev:
pnpm run dev
- chat:
url: /completion [post req]
payload:
{
"messages": [{
"role": "user",
"content": "Ai会替代人类工作吗"
}],
privateKey: ""
}
return:
{
"code": 200,
"data": {
"messages": [{
"role": "system",
"content": "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible."
}, {
"role": "user",
"content": "Ai会替代人类工作吗。"
}, {
"role": "assistant",
"content": "AI可以替代一些人类工作,但不是所有工作都可以被替代。"
}],
"reply": "AI可以替代一些人类工作,但不是所有工作都可以被替代。"
},
"errorMsg": ""
}
- 查询key:
url: /mykey [post req]
payload:
{"orderId": "56757"}
return:
{
"code": 200,
"data": {
"key": "private-key-29EIWIOIUIW"
},
"errorMsg": ""
}
- 添加key次数:
url: /setkey [post req]
payload:
{
"adminKey": "56757",
"privateKey": "56757",
"limit": 100
}
return:
{
"code": 200,
"data": {
"key": "private-key-29EIWIOIUIW",
"total": 500
},
"errorMsg": ""
}