feat(knowledge): add build mode support for configuration components
add build mode parameter to all configuration components to toggle between built-in and pipeline modes export new common items and update chunk method form to handle build mode selection
This commit is contained in:
@@ -9,24 +9,26 @@ import {
|
||||
KnowledgeGraphConfigItems
|
||||
} from './common-items';
|
||||
|
||||
export function QAConfiguration() {
|
||||
export function QAConfiguration({ buildMode = 'buildIn' }: { buildMode?: 'buildIn' | 'pipeline' }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<ConfigurationFormContainer>
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
|
||||
{/* 第一部分:基础配置 */}
|
||||
<Accordion defaultExpanded>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
<Typography variant="h6">{t('knowledge.config.basicConfig')}</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
|
||||
{/* 分块方法 */}
|
||||
<ChunkMethodItem />
|
||||
</Box>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
{buildMode === 'buildIn' && (
|
||||
<Accordion defaultExpanded>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
<Typography variant="h6">{t('knowledge.config.basicConfig')}</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
|
||||
{/* 分块方法 */}
|
||||
<ChunkMethodItem />
|
||||
</Box>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
)}
|
||||
|
||||
{/* 第二部分:RAPTOR策略 */}
|
||||
<Accordion>
|
||||
|
||||
Reference in New Issue
Block a user