Files
ragflow/web/src/components/use-knowledge-graph-item.tsx
balibabu 86f76df586 Feat: Retrieval test #3221 (#7121)
### What problem does this PR solve?

Feat: Retrieval test #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-04-17 19:03:55 +08:00

41 lines
869 B
TypeScript

import { Form, Switch } from 'antd';
import { useTranslation } from 'react-i18next';
import { SwitchFormField } from './switch-fom-field';
type IProps = {
filedName: string[] | string;
};
export function UseKnowledgeGraphItem({ filedName }: IProps) {
const { t } = useTranslation();
return (
<Form.Item
label={t('chat.useKnowledgeGraph')}
tooltip={t('chat.useKnowledgeGraphTip')}
name={filedName}
initialValue={false}
>
<Switch></Switch>
</Form.Item>
);
}
interface UseKnowledgeGraphFormFieldProps {
name: string;
}
export function UseKnowledgeGraphFormField({
name,
}: UseKnowledgeGraphFormFieldProps) {
const { t } = useTranslation();
return (
<SwitchFormField
name={name}
label={t('chat.useKnowledgeGraph')}
tooltip={t('chat.useKnowledgeGraphTip')}
></SwitchFormField>
);
}