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
b0402434
authored
May 08, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: text
parent
014fb504
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
20 additions
and
20 deletions
+20
-20
src/components/Layout/navbar.tsx
+1
-1
src/components/Layout/navbarPhone.tsx
+1
-1
src/constants/user.ts
+1
-1
src/pages/api/model/create.ts
+1
-1
src/pages/chat/components/ModelList.tsx
+1
-1
src/pages/chat/index.tsx
+1
-1
src/pages/login/components/RegisterForm.tsx
+1
-1
src/pages/model/components/ModelList.tsx
+1
-1
src/pages/model/components/detail/components/ModelEditForm.tsx
+3
-3
src/pages/model/components/detail/components/SelectFileModal.tsx
+1
-1
src/pages/model/components/detail/components/SelectUrlModal.tsx
+1
-1
src/pages/model/components/detail/index.tsx
+1
-1
src/pages/model/share/components/list.tsx
+1
-1
src/pages/model/share/index.tsx
+4
-4
src/pages/tools/index.tsx
+1
-1
No files found.
src/components/Layout/navbar.tsx
View file @
b0402434
...
...
@@ -17,7 +17,7 @@ const Navbar = () => {
const
navbarList
=
useMemo
(
()
=>
[
{
label
:
'
模型
'
,
label
:
'
AI助手
'
,
icon
:
'model'
,
link
:
`/model?modelId=
${
lastModelId
}
`
,
activeLink
:
[
'/model'
]
...
...
src/components/Layout/navbarPhone.tsx
View file @
b0402434
...
...
@@ -10,7 +10,7 @@ const NavbarPhone = () => {
const
navbarList
=
useMemo
(
()
=>
[
{
label
:
'
模型
'
,
label
:
'
AI助手
'
,
icon
:
'tabbarModel'
,
link
:
`/model`
,
activeLink
:
[
'/model'
]
...
...
src/constants/user.ts
View file @
b0402434
...
...
@@ -29,6 +29,6 @@ export enum PromotionEnum {
export
const
PromotionTypeMap
=
{
[
PromotionEnum
.
invite
]:
'好友充值'
,
[
PromotionEnum
.
shareModel
]:
'
模型
分享'
,
[
PromotionEnum
.
shareModel
]:
'
AI助手
分享'
,
[
PromotionEnum
.
withdraw
]:
'提现'
};
src/pages/api/model/create.ts
View file @
b0402434
...
...
@@ -26,7 +26,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
userId
});
if
(
authCount
>=
30
)
{
throw
new
Error
(
'上限 30 个
模型
'
);
throw
new
Error
(
'上限 30 个
助手
'
);
}
// 创建模型
...
...
src/pages/chat/components/ModelList.tsx
View file @
b0402434
...
...
@@ -44,7 +44,7 @@ const ModelList = ({ models, modelId }: { models: ModelListItemType[]; modelId:
{
item
.
name
}
</
Box
>
<
Box
className=
"textEllipsis"
color=
{
'myGray.400'
}
fontSize=
{
'sm'
}
>
{
item
.
systemPrompt
||
'这个
模型没有
提示词~'
}
{
item
.
systemPrompt
||
'这个
AI助手没有设置
提示词~'
}
</
Box
>
</
Box
>
</
Flex
>
...
...
src/pages/chat/index.tsx
View file @
b0402434
...
...
@@ -640,7 +640,7 @@ const Chat = ({
<MenuList fontSize={'sm'}>
{chatData.model.canUse && (
<MenuItem onClick={() => router.push(`/model?modelId=${chatData.modelId}`)}>
模型
详情
AI助手
详情
</MenuItem>
)}
<MenuItem onClick={() => onclickCopy(item.value)}>复制</MenuItem>
...
...
src/pages/login/components/RegisterForm.tsx
View file @
b0402434
...
...
@@ -67,7 +67,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
});
// aut register a model
postCreateModel
({
name
:
'
模型
1'
name
:
'
AI助手
1'
});
}
catch
(
error
:
any
)
{
toast
({
...
...
src/pages/model/components/ModelList.tsx
View file @
b0402434
...
...
@@ -146,7 +146,7 @@ const ModelList = ({ modelId }: { modelId: string }) => {
{
item
.
name
}
</
Box
>
<
Box
className=
"textEllipsis"
color=
{
'myGray.400'
}
fontSize=
{
'sm'
}
>
{
item
.
systemPrompt
||
'这个
模型没有
提示词~'
}
{
item
.
systemPrompt
||
'这个
AI助手没有设置
提示词~'
}
</
Box
>
</
Box
>
</
Flex
>
...
...
src/pages/model/components/detail/components/ModelEditForm.tsx
View file @
b0402434
...
...
@@ -38,7 +38,7 @@ const ModelEditForm = ({
handleDelModel
:
()
=>
void
;
})
=>
{
const
{
openConfirm
,
ConfirmChild
}
=
useConfirm
({
content
:
'确认删除该
模型
?'
content
:
'确认删除该
AI助手
?'
});
const
{
register
,
setValue
,
getValues
}
=
formHooks
;
const
[
refresh
,
setRefresh
]
=
useState
(
false
);
...
...
@@ -145,14 +145,14 @@ const ModelEditForm = ({
</
Flex
>
{
isOwner
&&
(
<
Flex
mt=
{
5
}
alignItems=
{
'center'
}
>
<
Box
flex=
{
'0 0 150px'
}
>
删除
模型
和知识库
</
Box
>
<
Box
flex=
{
'0 0 150px'
}
>
删除
AI
和知识库
</
Box
>
<
Button
colorScheme=
{
'gray'
}
variant=
{
'outline'
}
size=
{
'sm'
}
onClick=
{
openConfirm
(
handleDelModel
)
}
>
删除
模型
删除
AI助手
</
Button
>
</
Flex
>
)
}
...
...
src/pages/model/components/detail/components/SelectFileModal.tsx
View file @
b0402434
...
...
@@ -182,7 +182,7 @@ const SelectFileModal = ({
fontSize=
{
'sm'
}
>
<
Box
mt=
{
2
}
px=
{
5
}
maxW=
{
[
'100%'
,
'70%'
]
}
textAlign=
{
'justify'
}
color=
{
'blackAlpha.600'
}
>
支持
{
fileExtension
}
文件。
模型
会自动对文本进行 QA 拆分,需要较长训练时间,拆分需要消耗
支持
{
fileExtension
}
文件。
Gpt
会自动对文本进行 QA 拆分,需要较长训练时间,拆分需要消耗
tokens,账号余额不足时,未拆分的数据会被删除。一个
{
fileTextArr
.
length
}
个文本。
</
Box
>
{
/* 拆分模式 */
}
...
...
src/pages/model/components/detail/components/SelectUrlModal.tsx
View file @
b0402434
...
...
@@ -99,7 +99,7 @@ const SelectUrlModal = ({
fontSize=
{
'sm'
}
>
<
Box
mt=
{
2
}
maxW=
{
[
'100%'
,
'70%'
]
}
>
根据网站地址,获取网站文本内容(请注意仅能获取静态网站文本,注意看下获取后的内容是否正确)。
模型
会对文本进行
根据网站地址,获取网站文本内容(请注意仅能获取静态网站文本,注意看下获取后的内容是否正确)。
Gpt
会对文本进行
QA 拆分,需要较长训练时间,拆分需要消耗 tokens,账号余额不足时,未拆分的数据会被删除。
</
Box
>
<
Flex
w=
{
'100%'
}
alignItems=
{
'center'
}
my=
{
4
}
>
...
...
src/pages/model/components/detail/index.tsx
View file @
b0402434
...
...
@@ -31,7 +31,7 @@ const ModelDetail = ({ modelId, isPc }: { modelId: string; isPc: boolean }) => {
},
onError
(
err
:
any
)
{
toast
({
title
:
err
?.
message
||
'获取
模型
异常'
,
title
:
err
?.
message
||
'获取
AI助手
异常'
,
status
:
'error'
});
setLastModelId
(
''
);
...
...
src/pages/model/share/components/list.tsx
View file @
b0402434
...
...
@@ -38,7 +38,7 @@ const ShareModelList = ({
</
Box
>
</
Flex
>
<
Box
flex=
{
1
}
className=
{
styles
.
intro
}
my=
{
4
}
fontSize=
{
'sm'
}
color=
{
'blackAlpha.600'
}
>
{
model
.
share
.
intro
||
'这个
模型
没有介绍~'
}
{
model
.
share
.
intro
||
'这个
AI助手还
没有介绍~'
}
</
Box
>
<
Flex
justifyContent=
{
'space-between'
}
>
<
Flex
...
...
src/pages/model/share/index.tsx
View file @
b0402434
...
...
@@ -55,12 +55,12 @@ const modelList = () => {
<
Card
px=
{
6
}
py=
{
3
}
>
<
Flex
alignItems=
{
'center'
}
justifyContent=
{
'space-between'
}
>
<
Box
fontWeight=
{
'bold'
}
fontSize=
{
'xl'
}
>
我收藏的
模型
我收藏的
AI助手
</
Box
>
</
Flex
>
{
collectionModels
.
length
==
0
&&
(
<
Box
textAlign=
{
'center'
}
pt=
{
3
}
>
还没有收藏
模型
~
还没有收藏
AI助手
~
</
Box
>
)
}
<
Grid
templateColumns=
{
[
'1fr'
,
'1fr 1fr'
,
'1fr 1fr 1fr'
]
}
gridGap=
{
4
}
mt=
{
4
}
>
...
...
@@ -71,7 +71,7 @@ const modelList = () => {
<
Card
mt=
{
5
}
px=
{
6
}
py=
{
3
}
>
<
Box
display=
{
[
'block'
,
'flex'
]
}
alignItems=
{
'center'
}
justifyContent=
{
'space-between'
}
>
<
Box
fontWeight=
{
'bold'
}
flex=
{
1
}
fontSize=
{
'xl'
}
>
模型共享市场
{
' '
}
AI助手市场
<
Box
as=
{
'span'
}
fontWeight=
{
'normal'
}
fontSize=
{
'md'
}
>
(Beta)
</
Box
>
...
...
@@ -81,7 +81,7 @@ const modelList = () => {
maxW=
{
'240px'
}
size=
{
'sm'
}
value=
{
searchText
}
placeholder=
"搜索
模型
,回车确认"
placeholder=
"搜索
AI助手
,回车确认"
onChange=
{
(
e
)
=>
setSearchText
(
e
.
target
.
value
)
}
onBlur=
{
()
=>
{
if
(
searchText
===
lastSearch
.
current
)
return
;
...
...
src/pages/tools/index.tsx
View file @
b0402434
...
...
@@ -7,7 +7,7 @@ import { useRouter } from 'next/router';
const
list
=
[
{
icon
:
'shareMarket'
,
label
:
'
模型共享
市场'
,
label
:
'
AI助手
市场'
,
link
:
'/model/share'
},
{
...
...
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