add model test log (#4272)
* sync collection * remove lock * add model test log * update ui * update log * fix: channel test * preview chunk ui * test model ux * test model log * perf: dataset selector * fix: system plugin auth * update nextjs
This commit is contained in:
@@ -69,31 +69,37 @@ export const DatasetSelectModal = ({
|
||||
{selectedDatasets.map((item) =>
|
||||
(() => {
|
||||
return (
|
||||
<Card
|
||||
key={item.datasetId}
|
||||
p={3}
|
||||
border={theme.borders.base}
|
||||
boxShadow={'sm'}
|
||||
bg={'primary.200'}
|
||||
>
|
||||
<Flex alignItems={'center'} h={'38px'}>
|
||||
<Avatar src={item.avatar} w={['1.25rem', '1.75rem']}></Avatar>
|
||||
<Box flex={'1 0 0'} w={0} className="textEllipsis" mx={3}>
|
||||
{item.name}
|
||||
</Box>
|
||||
<MyIcon
|
||||
name={'delete'}
|
||||
w={'14px'}
|
||||
cursor={'pointer'}
|
||||
_hover={{ color: 'red.500' }}
|
||||
onClick={() => {
|
||||
setSelectedDatasets((state) =>
|
||||
state.filter((dataset) => dataset.datasetId !== item.datasetId)
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</Flex>
|
||||
</Card>
|
||||
<MyTooltip label={item.name}>
|
||||
<Card
|
||||
key={item.datasetId}
|
||||
p={3}
|
||||
border={'base'}
|
||||
boxShadow={'sm'}
|
||||
bg={'primary.200'}
|
||||
>
|
||||
<Flex alignItems={'center'} h={'38px'}>
|
||||
<Avatar
|
||||
src={item.avatar}
|
||||
w={['1.25rem', '1.75rem']}
|
||||
borderRadius={'sm'}
|
||||
></Avatar>
|
||||
<Box flex={'1 0 0'} w={0} className="textEllipsis" mx={3} fontSize={'sm'}>
|
||||
{item.name}
|
||||
</Box>
|
||||
<MyIcon
|
||||
name={'delete'}
|
||||
w={'14px'}
|
||||
cursor={'pointer'}
|
||||
_hover={{ color: 'red.500' }}
|
||||
onClick={() => {
|
||||
setSelectedDatasets((state) =>
|
||||
state.filter((dataset) => dataset.datasetId !== item.datasetId)
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</Flex>
|
||||
</Card>
|
||||
</MyTooltip>
|
||||
);
|
||||
})()
|
||||
)}
|
||||
@@ -117,7 +123,7 @@ export const DatasetSelectModal = ({
|
||||
label={
|
||||
item.type === DatasetTypeEnum.folder
|
||||
? t('common:dataset.Select Folder')
|
||||
: t('common:dataset.Select Dataset')
|
||||
: item.name
|
||||
}
|
||||
>
|
||||
<Card
|
||||
@@ -152,14 +158,18 @@ export const DatasetSelectModal = ({
|
||||
}}
|
||||
>
|
||||
<Flex alignItems={'center'} h={'38px'}>
|
||||
<Avatar src={item.avatar} w={['24px', '28px']}></Avatar>
|
||||
<Avatar
|
||||
src={item.avatar}
|
||||
w={['1.25rem', '1.75rem']}
|
||||
borderRadius={'sm'}
|
||||
></Avatar>
|
||||
<Box
|
||||
flex={'1 0 0'}
|
||||
w={0}
|
||||
className="textEllipsis"
|
||||
ml={3}
|
||||
fontSize={'md'}
|
||||
color={'myGray.900'}
|
||||
fontSize={'sm'}
|
||||
>
|
||||
{item.name}
|
||||
</Box>
|
||||
|
||||
@@ -268,12 +268,10 @@ const RenderUserFormInteractive = React.memo(function RenderFormInput({
|
||||
{interactive.params.description && <Markdown source={interactive.params.description} />}
|
||||
{interactive.params.inputForm?.map((input) => (
|
||||
<Box key={input.label}>
|
||||
<Flex mb={1} alignItems={'center'} w={'full'}>
|
||||
<FormLabel required={input.required} w={'full'} whiteSpace={'pre-wrap'}>
|
||||
{input.label}
|
||||
{input.description && <QuestionTip ml={1} label={input.description} />}
|
||||
</FormLabel>
|
||||
</Flex>
|
||||
<FormLabel mb={1} required={input.required} whiteSpace={'pre-wrap'}>
|
||||
{input.label}
|
||||
{input.description && <QuestionTip ml={1} label={input.description} />}
|
||||
</FormLabel>
|
||||
{input.type === FlowNodeInputTypeEnum.input && (
|
||||
<MyTextarea
|
||||
isDisabled={interactive.params.submitted}
|
||||
|
||||
@@ -250,22 +250,24 @@ export const WholeResponseContent = ({
|
||||
value={activeModule?.similarity}
|
||||
/>
|
||||
<Row label={t('common:core.chat.response.module limit')} value={activeModule?.limit} />
|
||||
<Row
|
||||
label={t('common:core.chat.response.search using reRank')}
|
||||
rawDom={
|
||||
<Box border={'base'} borderRadius={'md'} p={2}>
|
||||
{activeModule?.searchUsingReRank ? (
|
||||
activeModule?.rerankModel ? (
|
||||
<Box>{`${activeModule.rerankModel}: ${activeModule.rerankWeight}`}</Box>
|
||||
{activeModule?.searchUsingReRank !== undefined && (
|
||||
<Row
|
||||
label={t('common:core.chat.response.search using reRank')}
|
||||
rawDom={
|
||||
<Box border={'base'} borderRadius={'md'} p={2}>
|
||||
{activeModule?.searchUsingReRank ? (
|
||||
activeModule?.rerankModel ? (
|
||||
<Box>{`${activeModule.rerankModel}: ${activeModule.rerankWeight}`}</Box>
|
||||
) : (
|
||||
'True'
|
||||
)
|
||||
) : (
|
||||
'True'
|
||||
)
|
||||
) : (
|
||||
`False`
|
||||
)}
|
||||
</Box>
|
||||
}
|
||||
/>
|
||||
`False`
|
||||
)}
|
||||
</Box>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{activeModule.queryExtensionResult && (
|
||||
<>
|
||||
<Row
|
||||
|
||||
Reference in New Issue
Block a user