Skip to content

feat: add OCR, bank card, resume & contract AI parsing APIs#31

Open
zp6 wants to merge 1 commit into
idea2app:mainfrom
zp6:feature/feishu-doc-parser
Open

feat: add OCR, bank card, resume & contract AI parsing APIs#31
zp6 wants to merge 1 commit into
idea2app:mainfrom
zp6:feature/feishu-doc-parser

Conversation

@zp6
Copy link
Copy Markdown

@zp6 zp6 commented May 14, 2026

PR-31 PR-31 PR-31 Powered by Pull Request Badge

Summary

Implements the non-invoice/receipt document AI APIs requested in #27.

New APIs in DocumentAIModel

Method API Description

|
ecognizeImageText(image) | optical_char_recognition/v1/image/basic_recognize | OCR basic text recognition from base64 image |
|
ecognizeBankCard(file) | document_ai/v1/bank_card/recognize | Bank card recognition |
| parseResume(file) | document_ai/v1/resume/parse | Resume information parsing |
| extractContractFields(file, pdfPageLimit, ocrMode) | document_ai/v1/contract/field_extraction | Contract field extraction |

Changes

  • src/module/DocumentAI/type.ts - Added TypeScript interfaces for all 4 new API response types (BankCard, Resume with sub-types, ContractField with sub-types)
  • src/module/DocumentAI/index.ts - Added 4 new methods following the existing pattern (using @toggle('uploading') decorator, makeFormData for file uploads, proper LarkData response typing)

Closes #27

- recognizeImageText: OCR basic text recognition (optical_char_recognition/v1)
- recognizeBankCard: bank card recognition (document_ai/v1/bank_card)
- parseResume: resume information parsing (document_ai/v1/resume)
- extractContractFields: contract field extraction (document_ai/v1/contract)

Closes idea2app#27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

封装飞书【智能文档解析】非证照、票据类接口

1 participant