Skip to content

Commit 1dca5ed

Browse files
authored
v4.5.1-3 (#427)
1 parent 1942cb0 commit 1dca5ed

File tree

18 files changed

+142
-73
lines changed

18 files changed

+142
-73
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
3535

3636
## 🛸 在线使用
3737

38-
+ 🌐 国内版:[ai.fastgpt.in](https://ai.fastgpt.in/)
39-
+ 🌍 海外版:[fastgpt.run](https://fastgpt.run/)
38+
- 🌐 国内版:[ai.fastgpt.in](https://ai.fastgpt.in/)
39+
- 🌍 海外版:[fastgpt.run](https://fastgpt.run/)
4040

4141
| | |
4242
| ---------------------------------- | ---------------------------------- |
@@ -128,7 +128,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
128128

129129
本仓库遵循 [FastGPT Open Source License](./LICENSE) 开源协议。
130130

131-
1. 允许作为后台服务直接商用,但不允许直接使用 SaaS 服务商用
131+
1. 允许作为后台服务直接商用,但不允许提供 SaaS 服务
132132
2. 需保留相关版权信息。
133133
3. 完整请查看 [FastGPT Open Source License](./LICENSE)
134134
4. 联系方式:yujinlong@sealos.io, [点击查看定价策略](https://doc.fastgpt.run/docs/commercial)

docSite/content/docs/installation/upgrading/45.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ select pg_reload_conf();
3131

3232
-- 重构数据库索引和排序
3333
REINDEX DATABASE postgres;
34-
ALTER DATABASE postgres REFRESH COLLATION VERSION;
3534

3635
-- 开始构建索引,该索引构建时间非常久,直接点击右上角的叉,退出 Terminal 即可
3736
CREATE INDEX CONCURRENTLY vector_index ON modeldata USING hnsw (vector vector_ip_ops) WITH (m = 16, ef_construction = 64);

docSite/content/docs/workflow/examples/lab_appointment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ HTTP 模块允许你调用任意 POST 类型的 HTTP 接口,从而实验一些
527527
{
528528
"moduleId": "zltb5l",
529529
"name": "知识库搜索",
530-
"flowType": "kbSearchNode",
530+
"flowType": "datasetSearchNode",
531531
"showStatus": true,
532532
"position": {
533533
"x": 1634.995464753433,

docSite/content/docs/workflow/examples/op_question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ weight: 144
9797
{
9898
"moduleId": "nkxlso",
9999
"name": "知识库搜索",
100-
"flowType": "kbSearchNode",
100+
"flowType": "datasetSearchNode",
101101
"showStatus": true,
102102
"position": {
103103
"x": 1542.6434554710224,

projects/app/data/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"SystemParams": {
33
"vectorMaxProcess": 15,
44
"qaMaxProcess": 15,
5-
"pgHNSWEfSearch ": 60
5+
"pgHNSWEfSearch": 100
66
},
77
"ChatModels": [
88
{

projects/app/public/locales/en/common.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,16 @@
175175
"dataset": {
176176
"Choose Dataset": "Chookse Dataset",
177177
"Dataset": "Dataset",
178+
"Go Dataset": "To Dataset",
179+
"Quote Length": "Quote Length",
178180
"Read Dataset": "Read Dataset",
179181
"Search Top K": "Top K",
180182
"Set Empty Result Tip": ",Response empty text",
181-
"Similarity": "Similarity"
183+
"Similarity": "Similarity",
184+
"data": {
185+
"Edit": "Edit Data",
186+
"id": "Data ID"
187+
}
182188
}
183189
},
184190
"dataset": {

projects/app/public/locales/zh/common.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,16 @@
175175
"dataset": {
176176
"Choose Dataset": "关联知识库",
177177
"Dataset": "知识库",
178+
"Go Dataset": "前往知识库",
179+
"Quote Length": "引用内容长度",
178180
"Read Dataset": "查看知识库详情",
179181
"Search Top K": "单次搜索数量",
180182
"Set Empty Result Tip": ",未搜索到内容时回复指定内容",
181-
"Similarity": "相似度"
183+
"Similarity": "相似度",
184+
"data": {
185+
"Edit": "编辑数据",
186+
"id": "数据ID"
187+
}
182188
}
183189
},
184190
"dataset": {

projects/app/src/components/ChatBox/QuoteModal.tsx

Lines changed: 74 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useCallback, useMemo, useState } from 'react';
2-
import { ModalBody, Box, useTheme, Flex, Progress } from '@chakra-ui/react';
2+
import { ModalBody, Box, useTheme, Flex, Progress, Link } from '@chakra-ui/react';
33
import { getDatasetDataItemById } from '@/web/core/dataset/api';
44
import { useLoading } from '@/web/common/hooks/useLoading';
55
import { useToast } from '@/web/common/hooks/useToast';
@@ -13,6 +13,9 @@ import MyModal from '../MyModal';
1313
import { useTranslation } from 'react-i18next';
1414
import { useRouter } from 'next/router';
1515
import type { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
16+
import MyTooltip from '../MyTooltip';
17+
import NextLink from 'next/link';
18+
import { useSystemStore } from '@/web/common/system/useSystemStore';
1619

1720
const QuoteModal = ({
1821
rawSearch = [],
@@ -22,6 +25,7 @@ const QuoteModal = ({
2225
onClose: () => void;
2326
}) => {
2427
const { t } = useTranslation();
28+
const { isPc } = useSystemStore();
2529
const theme = useTheme();
2630
const router = useRouter();
2731
const { toast } = useToast();
@@ -67,7 +71,7 @@ const QuoteModal = ({
6771
title={
6872
<>
6973
知识库引用({rawSearch.length}条)
70-
<Box fontSize={['xs', 'sm']} fontWeight={'normal'}>
74+
<Box fontSize={'10px'} color={'myGray.500'} fontWeight={'normal'}>
7175
注意: 修改知识库内容成功后,此处不会显示变更情况。点击编辑后,会显示知识库最新的内容。
7276
</Box>
7377
</>
@@ -89,58 +93,83 @@ const QuoteModal = ({
8993
border={theme.borders.base}
9094
_notLast={{ mb: 2 }}
9195
position={'relative'}
92-
_hover={{ '& .edit': { display: 'flex' } }}
9396
overflow={'hidden'}
9497
>
9598
{!isShare && (
96-
<Flex alignItems={'center'} mb={1}>
99+
<Flex alignItems={'flex-end'} mb={1}>
97100
<RawSourceText sourceName={item.sourceName} sourceId={item.sourceId} />
98-
<Box flex={'1'} />
99-
{item.score && (
100-
<>
101-
<Progress
102-
mx={2}
103-
w={['60px', '100px']}
104-
value={item.score * 100}
105-
size="sm"
106-
borderRadius={'20px'}
107-
colorScheme="gray"
108-
border={theme.borders.base}
109-
/>
110-
<Box>{item.score.toFixed(4)}</Box>
111-
</>
112-
)}
101+
<Box flex={1} />
102+
<Link
103+
as={NextLink}
104+
display={'flex'}
105+
alignItems={'center'}
106+
color={'myBlue.600'}
107+
href={`/dataset/detail?datasetId=${item.datasetId}&currentTab=dataCard&collectionId=${item.collectionId}`}
108+
>
109+
{t('core.dataset.Go Dataset')}
110+
<MyIcon name={'rightArrowLight'} w={'10px'} />
111+
</Link>
113112
</Flex>
114113
)}
115114

116115
<Box>{item.q}</Box>
117116
<Box>{item.a}</Box>
118-
{item.id && !isShare && (
119-
<Box
120-
className="edit"
121-
display={'none'}
122-
position={'absolute'}
123-
right={0}
124-
top={0}
125-
bottom={0}
126-
w={'40px'}
127-
bg={'rgba(255,255,255,0.9)'}
128-
alignItems={'center'}
129-
justifyContent={'center'}
130-
boxShadow={'-10px 0 10px rgba(255,255,255,1)'}
131-
>
132-
<MyIcon
133-
name={'edit'}
134-
w={'18px'}
135-
h={'18px'}
136-
cursor={'pointer'}
137-
color={'myGray.600'}
138-
_hover={{
139-
color: 'myBlue.700'
140-
}}
141-
onClick={() => onclickEdit(item)}
142-
/>
143-
</Box>
117+
{!isShare && (
118+
<Flex alignItems={'center'} mt={2} gap={4}>
119+
{isPc && (
120+
<MyTooltip label={t('core.dataset.data.id')}>
121+
<Flex border={theme.borders.base} px={3} borderRadius={'md'}>
122+
# {item.id}
123+
</Flex>
124+
</MyTooltip>
125+
)}
126+
<MyTooltip label={t('core.dataset.Quote Length')}>
127+
<Flex alignItems={'center'}>
128+
<MyIcon name="common/text/t" w={'14px'} mr={1} color={'myGray.500'} />
129+
{item.q.length + item.a.length}
130+
</Flex>
131+
</MyTooltip>
132+
{!isShare && item.score && (
133+
<MyTooltip label={t('core.dataset.Similarity')}>
134+
<Flex alignItems={'center'}>
135+
<MyIcon name={'kbTest'} w={'12px'} />
136+
<Progress
137+
mx={2}
138+
w={['60px', '90px']}
139+
value={item.score * 100}
140+
size="sm"
141+
borderRadius={'20px'}
142+
colorScheme="gray"
143+
border={theme.borders.base}
144+
/>
145+
<Box>{item.score.toFixed(4)}</Box>
146+
</Flex>
147+
</MyTooltip>
148+
)}
149+
<Box flex={1} />
150+
{item.id && (
151+
<MyTooltip label={t('core.dataset.data.Edit')}>
152+
<Box
153+
bg={'rgba(255,255,255,0.9)'}
154+
alignItems={'center'}
155+
justifyContent={'center'}
156+
boxShadow={'-10px 0 10px rgba(255,255,255,1)'}
157+
>
158+
<MyIcon
159+
name={'edit'}
160+
w={['16px', '18px']}
161+
h={['16px', '18px']}
162+
cursor={'pointer'}
163+
color={'myGray.600'}
164+
_hover={{
165+
color: 'myBlue.700'
166+
}}
167+
onClick={() => onclickEdit(item)}
168+
/>
169+
</Box>
170+
</MyTooltip>
171+
)}
172+
</Flex>
144173
)}
145174
</Box>
146175
))}
Lines changed: 8 additions & 0 deletions
Loading
Lines changed: 7 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)