This commit is contained in:
archer
2023-08-10 10:30:35 +08:00
parent 85feb005b9
commit 9ea19b8eaa
8 changed files with 25 additions and 11 deletions

View File

@@ -59,14 +59,7 @@ const NodeCard = ({
);
return (
<Box
minW={minW}
maxW={'430px'}
bg={'white'}
border={theme.borders.md}
borderRadius={'md'}
boxShadow={'sm'}
>
<Box minW={minW} bg={'white'} border={theme.borders.md} borderRadius={'md'} boxShadow={'sm'}>
<Flex className="custom-drag-handle" px={4} py={3} alignItems={'center'}>
<Avatar src={logo} borderRadius={'md'} objectFit={'contain'} w={'30px'} h={'30px'} />
<Box ml={3} fontSize={'lg'} color={'myGray.600'}>

View File

@@ -202,7 +202,7 @@ function filterQuote({
const quotePrompt =
filterQuoteQA.length > 0
? `下面是知识库内容:
${filterQuoteQA.map((item, i) => `${i + 1}. [${item.q}\n${item.a}]`).join('\n')}
${filterQuoteQA.map((item) => `{Q:${item.q},A:${item.a}}`).join('\n')}
`
: '';
@@ -229,7 +229,7 @@ function getChatMessages({
const limitText = (() => {
if (limitPrompt) return limitPrompt;
if (quotePrompt && !limitPrompt) {
return '根据知识库内容回答问题,仅回复知识库提供的内容,不要对知识库内容做补充说明。';
return '严格按照知识库提供的内容回答,不要做过多补充。';
}
return '';
})();