fix: some RAG retrieval bugs (#1577)

Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
zxhlyh
2023-11-21 13:46:07 +08:00
committed by GitHub
parent d0456d0f42
commit 6768fd4d87
15 changed files with 267 additions and 106 deletions

View File

@@ -100,7 +100,11 @@ const Popup: FC<PopupProps> = ({
data={source.index_node_hash.substring(0, 7)}
icon={<BezierCurve03 className='mr-1 w-3 h-3' />}
/>
<ProgressTooltip data={Number(source.score.toFixed(2))} />
{
source.score && (
<ProgressTooltip data={Number(source.score.toFixed(2))} />
)
}
</div>
)
}

View File

@@ -59,6 +59,7 @@ const SettingsModal: FC<SettingsModalProps> = ({
const {
rerankDefaultModel,
isRerankDefaultModelVaild,
rerankModelList,
} = useProviderContext()
const handleValueChange = (type: string, value: string) => {
@@ -78,6 +79,7 @@ const SettingsModal: FC<SettingsModalProps> = ({
!isReRankModelSelected({
rerankDefaultModel,
isRerankDefaultModelVaild,
rerankModelList,
retrievalConfig,
indexMethod,
})
@@ -270,7 +272,7 @@ const SettingsModal: FC<SettingsModalProps> = ({
)}
<div
className='absolute z-10 bottom-0 w-full flex justify-end py-4 px-6 border-t bg-white '
className='absolute z-[5] bottom-0 w-full flex justify-end py-4 px-6 border-t bg-white '
style={{
borderColor: 'rgba(0, 0, 0, 0.05)',
}}