feat: Added auto_keywords and auto_questions fields to the parsing configuration page #2687 (#2987)

### What problem does this PR solve?

feat: Added auto_keywords and auto_questions fields to the parsing
configuration page #2687

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-10-23 15:45:03 +08:00
committed by GitHub
parent 8714754afc
commit ec6d942d83
7 changed files with 82 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { useHandleChunkMethodSelectChange } from '@/hooks/logic-hooks';
import { useSelectParserList } from '@/hooks/user-setting-hooks';
import { FormInstance } from 'antd';
import { useEffect, useMemo, useState } from 'react';
import { useCallback, useEffect, useMemo, useState } from 'react';
const ParserListMap = new Map([
[
@ -118,3 +118,13 @@ export const useFetchParserListOnMount = (
return { parserList: nextParserList, handleChange, selectedTag };
};
const hideAutoKeywords = ['qa', 'table', 'resume', 'knowledge_graph'];
export const useShowAutoKeywords = () => {
const showAutoKeywords = useCallback((selectedTag: string) => {
return hideAutoKeywords.every((x) => selectedTag !== x);
}, []);
return showAutoKeywords;
};