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
58cbf10c
authored
Jul 19, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
7fe2017a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
59 deletions
+35
-59
client/public/docs/chatProblem.md
+1
-1
client/src/constants/flow/ModuleTemplate.ts
+1
-1
client/src/pages/api/admin/initv4.ts
+26
-54
client/src/pages/api/app/detail.tsx
+1
-2
client/src/pages/api/openapi/v1/chat/completions.ts
+4
-0
client/src/pages/kb/detail/components/Import/FileSelect.tsx
+2
-1
No files found.
client/public/docs/chatProblem.md
View file @
58cbf10c
### 常见问题
**反馈问卷**
: 如果你遇到任何使用问题或有期望的功能,可以
[
填写该问卷
](
https://www.wjx.cn/vm/rLIw1uD.aspx#
)
**Git 地址**
:
[
项目地址。V4-preview 暂
为
开源,在正式版发布后会开源。
](
https://github.com/c121914yu/FastGPT
)
**Git 地址**
:
[
项目地址。V4-preview 暂
未
开源,在正式版发布后会开源。
](
https://github.com/c121914yu/FastGPT
)
**问题文档**
:
[
先看文档,再提问
](
https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh
)
**价格表**
| 计费项 | 价格: 元/ 1K tokens(包含上下文)|
...
...
client/src/constants/flow/ModuleTemplate.ts
View file @
58cbf10c
...
...
@@ -162,7 +162,7 @@ export const ChatModule: AppModuleTemplateItemType = {
'限定模型对话范围,会被放置在本次提问前,拥有强引导和限定性。例如:\n1. 知识库是关于 Laf 的介绍,参考知识库回答问题,与 "Laf" 无关内容,直接回复: "我不知道"。\n2. 你仅回答关于 "xxx" 的问题,其他问题回复: "xxxx"',
value: ''
},
Input_Template_TFSwitch,
//
Input_Template_TFSwitch,
{
key: 'quotePrompt',
type: FlowInputItemTypeEnum.target,
...
...
client/src/pages/api/admin/initv4.ts
View file @
58cbf10c
...
...
@@ -3,7 +3,6 @@ import type { NextApiRequest, NextApiResponse } from 'next';
import
{
jsonRes
}
from
'@/service/response'
;
import
{
authUser
}
from
'@/service/utils/auth'
;
import
{
connectToDatabase
,
App
}
from
'@/service/mongo'
;
import
{
rawSearchKey
}
from
'@/constants/chat'
;
const
chatTemplate
=
({
model
,
...
...
@@ -84,7 +83,7 @@ const chatTemplate = ({
},
{
key
:
'temperature'
,
type
:
'
custom
'
,
type
:
'
slider
'
,
label
:
'温度'
,
value
:
temperature
,
min
:
0
,
...
...
@@ -108,16 +107,16 @@ const chatTemplate = ({
label
:
'回复上限'
,
value
:
maxToken
,
min
:
100
,
max
:
16
000
,
max
:
4
000
,
step
:
50
,
markList
:
[
{
label
:
'0'
,
value
:
0
label
:
'
10
0'
,
value
:
10
0
},
{
label
:
'
16
000'
,
value
:
16
000
label
:
'
4
000'
,
value
:
4
000
}
],
connected
:
false
...
...
@@ -145,12 +144,6 @@ const chatTemplate = ({
connected
:
false
},
{
key
:
'switch'
,
type
:
'target'
,
label
:
'触发器'
,
connected
:
false
},
{
key
:
'quotePrompt'
,
type
:
'target'
,
label
:
'引用内容'
,
...
...
@@ -284,8 +277,8 @@ const kbTemplate = ({
}
],
position
:
{
x
:
-
210.2481710925384
3
,
y
:
665.7922967022607
x
:
-
196.8463268473848
3
,
y
:
797.3401378431948
},
moduleId
:
'v0nc1s'
},
...
...
@@ -327,8 +320,8 @@ const kbTemplate = ({
}
],
position
:
{
x
:
-
196.84632684738483
,
y
:
797.3401378431948
x
:
211.58250540918442
,
y
:
611.8700401034965
},
moduleId
:
'k9y3jm'
},
...
...
@@ -345,25 +338,12 @@ const kbTemplate = ({
type
:
'custom'
,
label
:
'对话模型'
,
value
:
model
,
list
:
[
{
label
:
'FastAI-4k'
,
value
:
'gpt-3.5-turbo'
},
{
label
:
'FastAI-16k'
,
value
:
'gpt-3.5-turbo-16k'
},
{
label
:
'FastAI-Plus'
,
value
:
'gpt-4'
}
],
list
:
[],
connected
:
false
},
{
key
:
'temperature'
,
type
:
'
custom
'
,
type
:
'
slider
'
,
label
:
'温度'
,
value
:
temperature
,
min
:
0
,
...
...
@@ -387,16 +367,16 @@ const kbTemplate = ({
label
:
'回复上限'
,
value
:
maxToken
,
min
:
100
,
max
:
16
000
,
max
:
4
000
,
step
:
50
,
markList
:
[
{
label
:
'0'
,
value
:
0
label
:
'
10
0'
,
value
:
10
0
},
{
label
:
'
16
000'
,
value
:
16
000
label
:
'
4
000'
,
value
:
4
000
}
],
connected
:
false
...
...
@@ -424,12 +404,6 @@ const kbTemplate = ({
connected
:
false
},
{
key
:
'switch'
,
type
:
'target'
,
label
:
'触发器'
,
connected
:
true
},
{
key
:
'quotePrompt'
,
type
:
'target'
,
label
:
'引用内容'
,
...
...
@@ -481,7 +455,7 @@ const kbTemplate = ({
},
{
key
:
'similarity'
,
type
:
'
custom
'
,
type
:
'
slider
'
,
label
:
'相似度'
,
value
:
searchSimilarity
,
min
:
0
,
...
...
@@ -489,8 +463,8 @@ const kbTemplate = ({
step
:
0.01
,
markList
:
[
{
label
:
'0'
,
value
:
0
label
:
'
10
0'
,
value
:
10
0
},
{
label
:
'1'
,
...
...
@@ -501,7 +475,7 @@ const kbTemplate = ({
},
{
key
:
'limit'
,
type
:
'
custom
'
,
type
:
'
slider
'
,
label
:
'单次搜索上限'
,
description
:
'最多取 n 条记录作为本次问题引用'
,
value
:
searchLimit
,
...
...
@@ -524,7 +498,7 @@ const kbTemplate = ({
key
:
'switch'
,
type
:
'target'
,
label
:
'触发器'
,
connected
:
tru
e
connected
:
fals
e
},
{
key
:
'userChatInput'
,
...
...
@@ -535,7 +509,7 @@ const kbTemplate = ({
],
outputs
:
[
{
key
:
rawSearchKey
,
key
:
'rawSearch'
,
label
:
'源搜索数据'
,
type
:
'hidden'
,
response
:
true
,
...
...
@@ -545,16 +519,14 @@ const kbTemplate = ({
key
:
'isEmpty'
,
label
:
'搜索结果为空'
,
type
:
'source'
,
targets
:
[
...(
searchEmptyText
targets
:
searchEmptyText
?
[
{
moduleId
:
'w8av9y'
,
key
:
'switch'
}
]
:
[])
]
:
[]
},
{
key
:
'quotePrompt'
,
...
...
@@ -593,7 +565,7 @@ const kbTemplate = ({
{
key
:
'answerText'
,
value
:
searchEmptyText
,
type
:
'
input
'
,
type
:
'
textarea
'
,
label
:
'回复的内容'
,
connected
:
false
}
...
...
client/src/pages/api/app/detail.tsx
View file @
58cbf10c
...
...
@@ -20,8 +20,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
const
{
app
}
=
await
authApp
({
appId
,
userId
,
authOwner
:
false
userId
});
jsonRes
(
res
,
{
...
...
client/src/pages/api/openapi/v1/chat/completions.ts
View file @
58cbf10c
...
...
@@ -125,6 +125,10 @@ export default withNextCors(async function handler(req: NextApiRequest, res: Nex
billId
});
if
(
!
answerText
)
{
throw
new
Error
(
'回复内容为空,可能模块编排出现问题'
);
}
// save chat
if
(
typeof
chatId
===
'string'
)
{
await
saveChat
({
...
...
client/src/pages/kb/detail/components/Import/FileSelect.tsx
View file @
58cbf10c
...
...
@@ -34,7 +34,8 @@ const FileSelect = ({ fileExtension, onSelectFile, isLoading, ...props }: Props)
>
<
Flex
justifyContent=
{
'center'
}
alignItems=
{
'center'
}
>
<
MyIcon
mr=
{
1
}
name=
{
'uploadFile'
}
w=
{
'16px'
}
/>
拖拽文件至此,或
{
' '
}
{
/* 拖拽文件至此,或{' '} */
}
点击
<
Box
ml=
{
1
}
as=
{
'span'
}
cursor=
{
'pointer'
}
color=
{
'myBlue.700'
}
onClick=
{
onOpen
}
>
选择文件
</
Box
>
...
...
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