mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-21 21:36:42 +08:00
feat: add toc option in transformer node in ingestion pipeline (#11992)
### What problem does this PR solve? Add TOC (Table of contents) option in Ingestion Pipeline canvas > Transformer node ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1925,6 +1925,7 @@ The Indexer will store the content in the corresponding data structures for the
|
|||||||
keywords: 'Keywords',
|
keywords: 'Keywords',
|
||||||
questions: 'Questions',
|
questions: 'Questions',
|
||||||
metadata: 'Metadata',
|
metadata: 'Metadata',
|
||||||
|
toc: 'Table of contents',
|
||||||
fieldName: 'Result destination',
|
fieldName: 'Result destination',
|
||||||
prompts: {
|
prompts: {
|
||||||
system: {
|
system: {
|
||||||
|
|||||||
@ -85,6 +85,7 @@ export enum ContextGeneratorFieldName {
|
|||||||
Keywords = 'keywords',
|
Keywords = 'keywords',
|
||||||
Questions = 'questions',
|
Questions = 'questions',
|
||||||
Metadata = 'metadata',
|
Metadata = 'metadata',
|
||||||
|
TableOfContents = 'toc',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const FileId = 'File'; // BeginId
|
export const FileId = 'File'; // BeginId
|
||||||
|
|||||||
@ -76,19 +76,23 @@ const ExtractorForm = ({ node }: INextOperatorForm) => {
|
|||||||
></SelectWithSearch>
|
></SelectWithSearch>
|
||||||
)}
|
)}
|
||||||
</RAGFlowFormItem>
|
</RAGFlowFormItem>
|
||||||
<RAGFlowFormItem label={t('flow.systemPrompt')} name="sys_prompt">
|
{form.getValues('field_name') !== 'toc' && (
|
||||||
<PromptEditor
|
<>
|
||||||
placeholder={t('flow.messagePlaceholder')}
|
<RAGFlowFormItem label={t('flow.systemPrompt')} name="sys_prompt">
|
||||||
showToolbar={true}
|
<PromptEditor
|
||||||
baseOptions={promptOptions}
|
placeholder={t('flow.messagePlaceholder')}
|
||||||
></PromptEditor>
|
showToolbar={true}
|
||||||
</RAGFlowFormItem>
|
baseOptions={promptOptions}
|
||||||
<RAGFlowFormItem label={t('flow.userPrompt')} name="prompts">
|
></PromptEditor>
|
||||||
<PromptEditor
|
</RAGFlowFormItem>
|
||||||
showToolbar={true}
|
<RAGFlowFormItem label={t('flow.userPrompt')} name="prompts">
|
||||||
baseOptions={promptOptions}
|
<PromptEditor
|
||||||
></PromptEditor>
|
showToolbar={true}
|
||||||
</RAGFlowFormItem>
|
baseOptions={promptOptions}
|
||||||
|
></PromptEditor>
|
||||||
|
</RAGFlowFormItem>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<Output list={outputList}></Output>
|
<Output list={outputList}></Output>
|
||||||
</FormWrapper>
|
</FormWrapper>
|
||||||
{visible && (
|
{visible && (
|
||||||
|
|||||||
Reference in New Issue
Block a user