Skip to content

Commit 008d0af

Browse files
authored
Quote Modal UI and fix doc (#432)
1 parent f2fb0ae commit 008d0af

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

docSite/content/docs/development/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ weight: 520
2323
"SystemParams": {
2424
"vectorMaxProcess": 15, // 向量生成最大进程,结合数据库性能和 key 来设置
2525
"qaMaxProcess": 15, // QA 生成最大进程,结合数据库性能和 key 来设置
26-
"pgHNSWEfSearch": 40 // pg vector 索引参数,越大精度高但速度慢
26+
"pgHNSWEfSearch": 100 // pg vector 索引参数,越大精度高但速度慢
2727
},
2828
"ChatModels": [
2929
{

docSite/content/docs/development/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ git clone [email protected]:<github_username>/FastGPT.git
5454

5555
**环境变量**
5656

57-
复制.env.template 文件,生成一个.env.local 环境变量文件夹,修改.env.local 里内容才是有效的变量。变量说明见 .env.template
57+
复制.env.template 文件,在同级目录下生成一个.env.local 文件,修改.env.local 里内容才是有效的变量。变量说明见 .env.template
5858

5959
**config 配置文件**
6060

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,16 @@ const QuoteModal = ({
9494
_notLast={{ mb: 2 }}
9595
position={'relative'}
9696
overflow={'hidden'}
97+
_hover={{ '& .hover-data': { display: 'flex' } }}
9798
>
9899
{!isShare && (
99-
<Flex alignItems={'flex-end'} mb={1}>
100+
<Flex alignItems={'flex-end'} mb={3} color={'myGray.500'}>
100101
<RawSourceText sourceName={item.sourceName} sourceId={item.sourceId} />
101102
<Box flex={1} />
102103
<Link
103104
as={NextLink}
104-
display={'flex'}
105+
className="hover-data"
106+
display={'none'}
105107
alignItems={'center'}
106108
color={'myBlue.600'}
107109
href={`/dataset/detail?datasetId=${item.datasetId}&currentTab=dataCard&collectionId=${item.collectionId}`}
@@ -112,10 +114,10 @@ const QuoteModal = ({
112114
</Flex>
113115
)}
114116

115-
<Box>{item.q}</Box>
116-
<Box>{item.a}</Box>
117+
<Box color={'black'}>{item.q}</Box>
118+
<Box color={'black'}>{item.a}</Box>
117119
{!isShare && (
118-
<Flex alignItems={'center'} mt={2} gap={4}>
120+
<Flex alignItems={'center'} mt={3} gap={4} color={'myGray.500'}>
119121
{isPc && (
120122
<MyTooltip label={t('core.dataset.data.id')}>
121123
<Flex border={theme.borders.base} px={3} borderRadius={'md'}>
@@ -139,7 +141,7 @@ const QuoteModal = ({
139141
value={item.score * 100}
140142
size="sm"
141143
borderRadius={'20px'}
142-
colorScheme="gray"
144+
colorScheme="myGray"
143145
border={theme.borders.base}
144146
/>
145147
<Box>{item.score.toFixed(4)}</Box>

projects/app/src/global/common/string/tools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ export function replaceVariable(text: string, obj: Record<string, string | numbe
2121
* maxLen > overlapLen
2222
*/
2323
export const splitText2Chunks = ({ text = '', maxLen }: { text: string; maxLen: number }) => {
24-
const overlapLen = Math.floor(maxLen * 0.2); // Overlap length
24+
const overlapLen = Math.floor(maxLen * 0.15); // Overlap length
2525
const tempMarker = 'SPLIT_HERE_SPLIT_HERE';
2626

2727
const stepReg: Record<number, RegExp> = {
2828
0: /(\n\n)/g,
2929
1: /([\n])/g,
30-
2: /([]|\.\s)/g,
30+
2: /[]|(?!<[^a-zA-Z])\.\s/g,
3131
3: /([]|!\s|\?\s)/g,
3232
4: /([]|;\s)/g,
3333
5: /([]|,\s)/g

projects/app/src/pages/api/system/getInitData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
4343
const defaultSystemEnv: SystemEnvType = {
4444
vectorMaxProcess: 15,
4545
qaMaxProcess: 15,
46-
pgHNSWEfSearch: 40
46+
pgHNSWEfSearch: 100
4747
};
4848
const defaultFeConfigs: FeConfigsType = {
4949
show_emptyChat: true,

projects/app/src/service/moduleDispatch/agent/classifyQuestion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ${systemPrompt}
131131
tokens: response.usage?.total_tokens || 0
132132
};
133133
} catch (error) {
134-
console.log('Your model may not support function_call');
134+
console.log('Your model may not support function_call', error);
135135

136136
return {
137137
arg: {},

0 commit comments

Comments
 (0)