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
915b104b
authored
Apr 11, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 输入引导。导出数据编码格式。列表数字被隐藏
parent
aaa350a1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
7 deletions
+16
-7
src/components/Markdown/index.module.scss
+1
-1
src/pages/model/detail/components/InputDataModal.tsx
+6
-2
src/pages/model/detail/components/ModelEditForm.tsx
+2
-2
src/service/errorCode.ts
+1
-1
src/styles/reset.scss
+5
-0
src/utils/file.ts
+1
-1
No files found.
src/components/Markdown/index.module.scss
View file @
915b104b
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
}
}
.markdown
ul
,
.markdown
ul
,
.markdown
ol
{
.markdown
ol
{
padding-left
:
1
em
;
padding-left
:
2
em
;
}
}
.markdown
ul
.no-list
,
.markdown
ul
.no-list
,
.markdown
ol
.no-list
{
.markdown
ol
.no-list
{
...
...
src/pages/model/detail/components/InputDataModal.tsx
View file @
915b104b
...
@@ -124,7 +124,9 @@ const InputDataModal = ({
...
@@ -124,7 +124,9 @@ const InputDataModal = ({
<
Box
flex=
{
2
}
mr=
{
[
0
,
4
]
}
mb=
{
[
4
,
0
]
}
h=
{
[
'230px'
,
'100%'
]
}
>
<
Box
flex=
{
2
}
mr=
{
[
0
,
4
]
}
mb=
{
[
4
,
0
]
}
h=
{
[
'230px'
,
'100%'
]
}
>
<
Box
h=
{
'30px'
}
>
问题
</
Box
>
<
Box
h=
{
'30px'
}
>
问题
</
Box
>
<
Textarea
<
Textarea
placeholder=
"相关问题,可以回车输入多个问法, 最多500字"
placeholder=
{
'相关问题,可以输入多个问法, 最多500字。例如:\n1. laf 是什么?\n2. laf 可以做什么?\n3. laf怎么用'
}
maxLength=
{
500
}
maxLength=
{
500
}
resize=
{
'none'
}
resize=
{
'none'
}
h=
{
'calc(100% - 30px)'
}
h=
{
'calc(100% - 30px)'
}
...
@@ -136,7 +138,9 @@ const InputDataModal = ({
...
@@ -136,7 +138,9 @@ const InputDataModal = ({
<
Box
flex=
{
3
}
h=
{
[
'330px'
,
'100%'
]
}
>
<
Box
flex=
{
3
}
h=
{
[
'330px'
,
'100%'
]
}
>
<
Box
h=
{
'30px'
}
>
知识点
</
Box
>
<
Box
h=
{
'30px'
}
>
知识点
</
Box
>
<
Textarea
<
Textarea
placeholder=
"知识点,最多1000字"
placeholder=
{
'知识点,最多1000字。请保持主语的完整性,缺少主语会导致效果不佳。例如:\n1. laf是一个云函数开发平台。\n2. laf 什么都能做。\n3. 下面是使用 laf 的例子: ……'
}
maxLength=
{
1000
}
maxLength=
{
1000
}
resize=
{
'none'
}
resize=
{
'none'
}
h=
{
'calc(100% - 30px)'
}
h=
{
'calc(100% - 30px)'
}
...
...
src/pages/model/detail/components/ModelEditForm.tsx
View file @
915b104b
...
@@ -151,8 +151,8 @@ const ModelEditForm = ({
...
@@ -151,8 +151,8 @@ const ModelEditForm = ({
{
...
register
('
systemPrompt
')}
{
...
register
('
systemPrompt
')}
placeholder=
{
placeholder=
{
canTrain
canTrain
?
'训练的模型会根据知识库内容,生成一部分系统提示词,因此在对话时需要消耗更多的 tokens。你
仍可以增加一些提示词,让其效果更精确。
'
?
'训练的模型会根据知识库内容,生成一部分系统提示词,因此在对话时需要消耗更多的 tokens。你
可以增加提示词,让效果更符合预期。例如: \n1. 请根据知识库内容回答用户问题。\n2. 知识库是电影《铃芽之旅》的内容,根据知识库内容回答。无关问题,拒绝回复!
'
:
'模型默认的 prompt 词,通过调整该内容,可以生成一个限定范围的模型。\n
\n
注意,改功能会影响对话的整体朝向!'
:
'模型默认的 prompt 词,通过调整该内容,可以生成一个限定范围的模型。\n注意,改功能会影响对话的整体朝向!'
}
}
/>
/>
</
Box
>
</
Box
>
...
...
src/service/errorCode.ts
View file @
915b104b
...
@@ -8,7 +8,7 @@ export const openaiError: Record<string, string> = {
...
@@ -8,7 +8,7 @@ export const openaiError: Record<string, string> = {
};
};
export
const
openaiError2
:
Record
<
string
,
string
>
=
{
export
const
openaiError2
:
Record
<
string
,
string
>
=
{
insufficient_quota
:
'API 余额不足'
,
insufficient_quota
:
'API 余额不足'
,
invalid_request_error
:
'
输入参数
异常'
invalid_request_error
:
'
openai 接口
异常'
};
};
export
const
proxyError
:
Record
<
string
,
boolean
>
=
{
export
const
proxyError
:
Record
<
string
,
boolean
>
=
{
ECONNABORTED
:
true
,
ECONNABORTED
:
true
,
...
...
src/styles/reset.scss
View file @
915b104b
...
@@ -49,6 +49,11 @@ svg {
...
@@ -49,6 +49,11 @@ svg {
background
:
#999
;
background
:
#999
;
}
}
input
:
:
placeholder
,
textarea
::
placeholder
{
font-size
:
0
.85em
;
}
@media
(
max-width
:
900px
)
{
@media
(
max-width
:
900px
)
{
html
{
html
{
font-size
:
14px
;
font-size
:
14px
;
...
...
src/utils/file.ts
View file @
915b104b
...
@@ -125,7 +125,7 @@ export const fileDownload = ({
...
@@ -125,7 +125,7 @@ export const fileDownload = ({
filename
:
string
;
filename
:
string
;
})
=>
{
})
=>
{
// 导出为文件
// 导出为文件
const
blob
=
new
Blob
([
text
],
{
type
:
`
${
type
}
;charset=utf-8
`
});
const
blob
=
new
Blob
([
`\uFEFF
${
text
}
`
],
{
type
:
`
${
type
}
;charset=utf-8;
`
});
// 创建下载链接
// 创建下载链接
const
downloadLink
=
document
.
createElement
(
'a'
);
const
downloadLink
=
document
.
createElement
(
'a'
);
...
...
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