feat: add image context window in dataset config (#12094)

### What problem does this PR solve?

Add image context window configuration in **Dataset** >
**Configduration** and **Dataset** > **Files** > **Parse** > **Ingestion
Pipeline** (**Chunk Method** modal)

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Jimmy Ben Klieve
2025-12-22 19:51:23 +08:00
committed by GitHub
parent e5f3d5ae26
commit 38ac6a7c27
8 changed files with 163 additions and 436 deletions

View File

@ -310,6 +310,36 @@ export function EnableTocToggle() {
);
}
export function ImageContextWindow() {
const { t } = useTranslate('knowledgeConfiguration');
const form = useFormContext();
return (
<FormField
control={form.control}
name="parser_config.image_context_window"
render={({ field }) => (
<FormItem>
<FormControl>
<SliderInputFormField
{...field}
label={t('imageContextWindow')}
tooltip={t('imageContextWindowTip')}
defaultValue={0}
min={0}
max={256}
/>
</FormControl>
<div className="flex pt-1">
<div className="w-1/4"></div>
<FormMessage />
</div>
</FormItem>
)}
/>
);
}
export function OverlappedPercent() {
return (
<SliderInputFormField