Feature: Memory interface integration testing (#11833)

### What problem does this PR solve?

Feature: Memory interface integration testing

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
chanx
2025-12-09 14:52:58 +08:00
committed by GitHub
parent c51e6b2a58
commit 28bc87c5e2
32 changed files with 1168 additions and 501 deletions

View File

@ -1,4 +1,5 @@
import { SelectWithSearch } from '@/components/originui/select-with-search';
import { SliderInputFormField } from '@/components/slider-input-form-field';
import {
FormControl,
FormField,
@ -11,6 +12,7 @@ import { Spin } from '@/components/ui/spin';
import { Switch } from '@/components/ui/switch';
import { useTranslate } from '@/hooks/common-hooks';
import { cn } from '@/lib/utils';
import { t } from 'i18next';
import { useMemo, useState } from 'react';
import { FieldValues, useFormContext } from 'react-hook-form';
import {
@ -285,3 +287,14 @@ export function EnableTocToggle() {
/>
);
}
export function OverlappedPercent() {
return (
<SliderInputFormField
name="parser_config.overlapped_percent"
label={t('flow.filenameEmbeddingWeight')}
max={0.5}
step={0.01}
></SliderInputFormField>
);
}

View File

@ -10,7 +10,7 @@ import {
ConfigurationFormContainer,
MainContainer,
} from '../configuration-form-container';
import { EnableTocToggle } from './common-item';
import { EnableTocToggle, OverlappedPercent } from './common-item';
export function NaiveConfiguration() {
return (
@ -20,6 +20,7 @@ export function NaiveConfiguration() {
<MaxTokenNumberFormField initialValue={512}></MaxTokenNumberFormField>
<DelimiterFormField></DelimiterFormField>
<EnableTocToggle />
<OverlappedPercent />
</ConfigurationFormContainer>
<ConfigurationFormContainer>
<AutoKeywordsFormField></AutoKeywordsFormField>

View File

@ -29,6 +29,7 @@ export const formSchema = z
tag_kb_ids: z.array(z.string()).nullish(),
topn_tags: z.number().optional(),
toc_extraction: z.boolean().optional(),
overlapped_percent: z.number().optional(),
raptor: z
.object({
use_raptor: z.boolean().optional(),

View File

@ -67,6 +67,7 @@ export default function DatasetSettings() {
html4excel: false,
topn_tags: 3,
toc_extraction: false,
overlapped_percent: 0,
raptor: {
use_raptor: true,
max_token: 256,

View File

@ -14,16 +14,18 @@ export function PermissionFormField() {
}, [t]);
return (
<RAGFlowFormItem
name="permission"
label={t('knowledgeConfiguration.permissions')}
tooltip={t('knowledgeConfiguration.permissionsTip')}
horizontal
>
<SelectWithSearch
options={teamOptions}
triggerClassName="w-3/4"
></SelectWithSearch>
</RAGFlowFormItem>
<div className="items-center">
<RAGFlowFormItem
name="permission"
label={t('knowledgeConfiguration.permissions')}
tooltip={t('knowledgeConfiguration.permissionsTip')}
horizontal={true}
>
<SelectWithSearch
options={teamOptions}
triggerClassName="w-full"
></SelectWithSearch>
</RAGFlowFormItem>
</div>
);
}