feat: 文案内容

This commit is contained in:
Archer 2023-03-09 21:23:58 +08:00
parent 17364e9da3
commit e132c622a6
No known key found for this signature in database
GPG Key ID: A3F5915562F98511
4 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,7 @@
# Doc GPT
Doc GPT 允许你是用自己的 openai API KEY 来快速的调用 openai 接口,包括 GPT3 及其微调方法,以及最新的 gpt3.5 接口。
## 初始化
复制 .env.template 成 .env.local ,填写核心参数

View File

@ -356,7 +356,7 @@
line-height: 1.6;
letter-spacing: 0.5px;
text-align: justify;
word-break: break-all;
pre {
display: block;
width: 100%;

View File

@ -6,6 +6,8 @@ export enum EmailTypeEnum {
export const introPage = `
## 使 Doc GPT
[Git ](https://github.com/c121914yu/DocGPT)
使:
1. 使
2. openai openai API Key

View File

@ -20,10 +20,13 @@ export const jsonRes = (
let msg = message;
if ((code < 200 || code >= 400) && !message) {
msg =
typeof error === 'string'
? error
: openaiError[error?.response?.data?.message] || error?.message || '请求错误';
msg = error?.message || '请求错误';
if (typeof error === 'string') {
msg = error;
} else if (error?.response?.data?.message in openaiError) {
msg = openaiError[error?.response?.data?.message];
}
console.error(error);
console.error(msg);
}