fix: remove Top K in retrieval testing #770 and if the document parsing fails, the error message returned by the backend is displayed (#782)

### What problem does this PR solve?

fix: remove Top K in retrieval testing  #770
fix: if the document parsing fails, the error message returned by the
backend is displayed.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-05-15 13:58:30 +08:00
committed by GitHub
parent 4d47b2b459
commit 5effbfac80
5 changed files with 37 additions and 20 deletions

View File

@@ -1,13 +1,17 @@
import { Alert, Flex } from 'antd';
import { useTranslate } from '@/hooks/commonHooks';
import React from 'react';
import styles from './index.less';
const FileError = () => {
const FileError = ({ children }: React.PropsWithChildren) => {
const { t } = useTranslate('fileManager');
return (
<Flex align="center" justify="center" className={styles.errorWrapper}>
<Alert type="error" message={<h1>{t('fileError')}</h1>}></Alert>
<Alert
type="error"
message={<h2>{children || t('fileError')}</h2>}
></Alert>
</Flex>
);
};