Feat: add TCADP Parser (#10775)

### What problem does this PR solve?

This PR adds a new TCADP (Tencent Cloud Advanced Document Processing)
parser to RAGFlow, enabling users to leverage Tencent Cloud's document
parsing capabilities for more accurate and structured document
processing. The implementation includes:
New TCADP Parser: A complete implementation of Tencent Cloud's document
parsing API without SDK dependency
Configuration Support: Added configuration options in service_conf.yaml
for Tencent Cloud API credentials
Frontend Integration: Updated UI components to support the new TCADP
parser option
Error Handling: Comprehensive error handling and retry mechanisms for
API calls
Result Processing: Support for both SSE streaming and JSON response
formats from Tencent Cloud API

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
aidan
2025-10-27 15:14:58 +08:00
committed by GitHub
parent 56def59c2b
commit 33a189f620
10 changed files with 579 additions and 9 deletions

View File

@ -19,6 +19,7 @@ export const enum ParseDocumentType {
PlainText = 'Plain Text',
MinerU = 'MinerU',
Docling = 'Docling',
TCADPParser = 'TCADP Parser',
}
export function LayoutRecognizeFormField({
@ -45,6 +46,7 @@ export function LayoutRecognizeFormField({
ParseDocumentType.PlainText,
ParseDocumentType.MinerU,
ParseDocumentType.Docling,
ParseDocumentType.TCADPParser,
].map((x) => ({
label: x === ParseDocumentType.PlainText ? t(camelCase(x)) : x,
value: x,

View File

@ -20,7 +20,8 @@ export function PdfFormFields({ prefix }: CommonProps) {
return (
!isEmpty(parseMethod) &&
parseMethod !== ParseDocumentType.DeepDOC &&
parseMethod !== ParseDocumentType.PlainText
parseMethod !== ParseDocumentType.PlainText &&
parseMethod !== ParseDocumentType.TCADPParser
);
}, [parseMethod]);