Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
26888e85
authored
Mar 09, 2023
by
Archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
e132c622
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
16 deletions
+16
-16
README.md
+3
-3
src/constants/common.ts
+2
-2
src/pages/_app.tsx
+2
-2
src/pages/login/components/ForgetPasswordForm.tsx
+1
-1
src/pages/login/components/LoginForm.tsx
+1
-1
src/pages/login/components/RegisterForm.tsx
+1
-1
src/service/utils/sendEmail.ts
+6
-6
No files found.
README.md
View file @
26888e85
#
Doc
GPT
#
Fast
GPT
Doc
GPT 允许你是用自己的 openai API KEY 来快速的调用 openai 接口,包括 GPT3 及其微调方法,以及最新的 gpt3.5 接口。
Fast
GPT 允许你是用自己的 openai API KEY 来快速的调用 openai 接口,包括 GPT3 及其微调方法,以及最新的 gpt3.5 接口。
## 初始化
复制 .env.template 成 .env.local ,填写核心参数
...
...
@@ -76,7 +76,7 @@ docker run -d --name mongo \
# 介绍页
## 欢迎使用
Doc
GPT
## 欢迎使用
Fast
GPT
时间比较赶,介绍没来得及完善,先直接上怎么使用:
...
...
src/constants/common.ts
View file @
26888e85
...
...
@@ -4,9 +4,9 @@ export enum EmailTypeEnum {
}
export
const
introPage
=
`
## 欢迎使用
Doc
GPT
## 欢迎使用
Fast
GPT
[Git 仓库](https://github.com/c121914yu/
Doc
GPT)
[Git 仓库](https://github.com/c121914yu/
Fast
GPT)
时间比较赶,介绍没来得及完善,先直接上怎么使用:
1. 使用邮箱注册账号。
...
...
src/pages/_app.tsx
View file @
26888e85
...
...
@@ -30,8 +30,8 @@ export default function App({ Component, pageProps }: AppProps) {
return
(
<>
<
Head
>
<
title
>
Doc
GPT
</
title
>
<
meta
name=
"description"
content=
"Generated by
Doc
GPT"
/>
<
title
>
Fast
GPT
</
title
>
<
meta
name=
"description"
content=
"Generated by
Fast
GPT"
/>
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"
...
...
src/pages/login/components/ForgetPasswordForm.tsx
View file @
26888e85
...
...
@@ -77,7 +77,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
return
(
<>
<
Box
fontWeight=
{
'bold'
}
fontSize=
{
'2xl'
}
textAlign=
{
'center'
}
>
找回
Doc
GPT 账号
找回
Fast
GPT 账号
</
Box
>
<
form
onSubmit=
{
handleSubmit
(
onclickFindPassword
)
}
>
<
FormControl
mt=
{
8
}
isInvalid=
{
!!
errors
.
email
}
>
...
...
src/pages/login/components/LoginForm.tsx
View file @
26888e85
...
...
@@ -58,7 +58,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
return
(
<>
<
Box
fontWeight=
{
'bold'
}
fontSize=
{
'2xl'
}
textAlign=
{
'center'
}
>
登录
Doc
GPT
登录
Fast
GPT
</
Box
>
<
form
onSubmit=
{
handleSubmit
(
onclickLogin
)
}
>
<
FormControl
mt=
{
8
}
isInvalid=
{
!!
errors
.
email
}
>
...
...
src/pages/login/components/RegisterForm.tsx
View file @
26888e85
...
...
@@ -78,7 +78,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
return
(
<>
<
Box
fontWeight=
{
'bold'
}
fontSize=
{
'2xl'
}
textAlign=
{
'center'
}
>
注册
Doc
GPT 账号
注册
Fast
GPT 账号
</
Box
>
<
form
onSubmit=
{
handleSubmit
(
onclickRegister
)
}
>
<
FormControl
mt=
{
8
}
isInvalid=
{
!!
errors
.
email
}
>
...
...
src/service/utils/sendEmail.ts
View file @
26888e85
...
...
@@ -15,19 +15,19 @@ let mailTransport = nodemailer.createTransport({
const
emailMap
:
{
[
key
:
string
]:
any
}
=
{
[
EmailTypeEnum
.
register
]:
{
subject
:
'注册
Doc
GPT 账号'
,
html
:
(
code
:
string
)
=>
`<div>您正在注册
Doc
GPT 账号,验证码为:
${
code
}
</div>`
subject
:
'注册
Fast
GPT 账号'
,
html
:
(
code
:
string
)
=>
`<div>您正在注册
Fast
GPT 账号,验证码为:
${
code
}
</div>`
},
[
EmailTypeEnum
.
findPassword
]:
{
subject
:
'修改
Doc
GPT 密码'
,
html
:
(
code
:
string
)
=>
`<div>您正在修改
Doc
GPT 账号密码,验证码为:
${
code
}
</div>`
subject
:
'修改
Fast
GPT 密码'
,
html
:
(
code
:
string
)
=>
`<div>您正在修改
Fast
GPT 账号密码,验证码为:
${
code
}
</div>`
}
};
export
const
sendCode
=
(
email
:
string
,
code
:
string
,
type
:
`
${
EmailTypeEnum
}
`
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
options
=
{
from
:
`"
Doc
GPT"
${
myEmail
}
`
,
from
:
`"
Fast
GPT"
${
myEmail
}
`
,
to
:
email
,
subject
:
emailMap
[
type
]?.
subject
,
html
:
emailMap
[
type
]?.
html
(
code
)
...
...
@@ -46,7 +46,7 @@ export const sendCode = (email: string, code: string, type: `${EmailTypeEnum}`)
export
const
sendTrainSucceed
=
(
email
:
string
,
modelName
:
string
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
options
=
{
from
:
`"
Doc
GPT"
${
myEmail
}
`
,
from
:
`"
Fast
GPT"
${
myEmail
}
`
,
to
:
email
,
subject
:
'模型训练完成通知'
,
html
:
`你的模型
${
modelName
}
已于
${
dayjs
().
format
(
'YYYY-MM-DD HH:mm'
)}
训练完成!`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment