返回顶部
l

laiye-doc-processing 来也文档处理

Enterprise-grade agentic document processing API. Accurately extracts key fields and line items from invoices, receipts, orders and more across 10+ file formats, with confidence scoring. Zero-configuration, fast integration. Professionally optimized on massive enterprise documents.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
145
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

laiye-doc-processing

Laiye 智能体文档处理 (ADP)

智能体文档处理 API — 使用 VLM 和 LLM 将 10 多种文件格式(.jpeg、.jpg、.png、.bmp、.tiff、.pdf、.doc、.docx、.xls、.xlsx)转换为带有每个字段置信度分数的结构化 JSON/Excel。

基础 URL: https://adp-global.laiye.com/?utm_source=github

快速开始

bash
curl -X POST https://adp-global.laiye.com/open/agenticdocprocessor/laiye/v1/app/doc/extract \
-H Content-Type: application/json \
-H X-Access-Key: $ADPACCESSKEY \
-H X-Timestamp: $(date +%s) \
-H X-Signature: $(uuidgen) \
-d {
appkey: $ADPAPP_KEY,
appsecret: $ADPAPP_SECRET,
file_url: https://example.com/invoice.pdf
}

响应:
json
{
status: success,
extraction_result: [
{
fieldkey: invoicenumber,
field_value: INV-2024-001,
field_type: text,
confidence: 0.95,
source_pages: [1]
},
{
fieldkey: totalamount,
field_value: 1000.00,
field_type: number,
confidence: 0.98,
source_pages: [1]
}
]
}

设置

1. 获取您的 API 凭证

bash

联系 ADP 服务提供商获取:


- app_key: 应用程序访问密钥


- app_secret: 应用程序密钥


- X-Access-Key: 租户级访问密钥

保存您的凭证:
bash
export ADPACCESSKEY=youraccesskey_here
export ADPAPPKEY=yourappkey_here
export ADPAPPSECRET=yourappsecret_here

2. 配置(可选)

推荐:使用环境变量(最安全):
json5
{
skills: {
entries: {
adp-doc-extraction: {
enabled: true,
// 从环境变量加载的 API 凭证
},
},
},
}

安全说明:

  • - 设置文件权限:chmod 600 ~/.openclaw/openclaw.json
  • 切勿将此文件提交到版本控制
  • 优先使用环境变量或密钥存储
  • 定期轮换凭证

常见任务

从文件 URL 提取

bash
curl -X POST https://adp-global.laiye.com/open/agenticdocprocessor/laiye/v1/app/doc/extract \
-H Content-Type: application/json \
-H X-Access-Key: $ADPACCESSKEY \
-H X-Timestamp: $(date +%s) \
-H X-Signature: $(uuidgen) \
-d {
appkey: $ADPAPP_KEY,
appsecret: $ADPAPP_SECRET,
file_url: https://example.com/document.pdf
}

从 Base64 提取

bash

将文件转换为 base64


file_base64=$(base64 -i document.pdf | tr -d \n)

curl -X POST https://adp-global.laiye.com/open/agenticdocprocessor/laiye/v1/app/doc/extract \
-H Content-Type: application/json \
-H X-Access-Key: $ADPACCESSKEY \
-H X-Timestamp: $(date +%s) \
-H X-Signature: $(uuidgen) \
-d {
\appkey\: \$ADPAPP_KEY\,
\appsecret\: \$ADPAPP_SECRET\,
\filebase64\: \$filebase64\,
\file_name\: \document.pdf\
}

提取并包含 VLM 结果

bash
curl -X POST https://adp-global.laiye.com/open/agenticdocprocessor/laiye/v1/app/doc/extract \
-H Content-Type: application/json \
-H X-Access-Key: $ADPACCESSKEY \
-H X-Timestamp: $(date +%s) \
-H X-Signature: $(uuidgen) \
-d {
appkey: $ADPAPP_KEY,
appsecret: $ADPAPP_SECRET,
file_url: https://example.com/document.pdf,
withrecresult: true
}

访问 VLM 结果:response[docrecognizeresult]

异步提取(大型文档)

创建提取任务:
bash
curl -X POST https://adp-global.laiye.com/open/agenticdocprocessor/laiye/v1/app/doc/extract/create/task \
-H Content-Type: application/json \
-H X-Access-Key: $ADPACCESSKEY \
-H X-Timestamp: $(date +%s) \
-H X-Signature: $(uuidgen) \
-d {
appkey: $ADPAPP_KEY,
appsecret: $ADPAPP_SECRET,
file_url: https://example.com/large-document.pdf
}

返回:{taskid: taskid_value, metadata: {...}}

轮询获取结果:
bash
curl -X GET https://adp-global.laiye.com/open/agenticdocprocessor/laiye/v1/app/doc/extract/query/task/{task_id} \
-H X-Access-Key: $ADPACCESSKEY

高级功能

自定义缩放参数

通过更高分辨率增强 VLM 质量:
bash

model_params: { scale: 2.0 }

指定配置版本

使用特定的提取配置:
bash

modelparams: { versionid: configversionid }

仅文档识别

获取 VLM 结果而不进行提取:
bash
curl -X POST https://adp-global.laiye.com/open/agenticdocprocessor/laiye/v1/app/doc/recognize \
-H Content-Type: application/json \
-H X-Access-Key: $ADPACCESSKEY \
-H X-Timestamp: $(date +%s) \
-H X-Signature: $(uuidgen) \
-d {
appkey: $ADPAPP_KEY,
appsecret: $ADPAPP_SECRET,
file_url: https://example.com/document.pdf
}

何时使用

使用 ADP 的场景:

  • - 发票处理
  • 订单处理
  • 收据处理
  • 财务文档处理
  • 物流文档处理
  • 多表格文档数据提取

不适用的场景:

  • - 视频转录
  • 音频转录

最佳实践

文档大小端点说明
小文件/doc/extract(同步)即时响应
大文件
/doc/extract/create/task(异步) | 轮询获取结果 |

文件输入:

  • - fileurl:大文件优先(已托管)
  • filebase64:用于直接上传(最大 20MB)

置信度分数:

  • - 范围:每个字段 0-1
  • 手动检查置信度 <0.8 的字段

响应结构:

  • - extractionresult:提取的字段数组
  • docrecognizeresult:VLM 结果(当 withrec_result=true 时)
  • metadata:处理信息(页数、时间、模型)

响应模式

成功响应

json { status: success, message: string, extraction_result: [ { field_key: string, field_value: string, field_type: text|number|date|table, confidence: 0.95, source_pages: [1], tabledata: [...] // 当 fieldtype=table 时 } ], docrecognizeresult: [...

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 adp-skill-1776114549 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 adp-skill-1776114549 技能

通过命令行安装

skillhub install adp-skill-1776114549

下载

⬇ 下载 laiye-doc-processing v1.0.0(免费)

文件大小: 13.04 KB | 发布时间: 2026-4-17 13:54

v1.0.0 最新 2026-4-17 13:54
Initial release of the Laiye Agentic Document Processing (ADP) skill.

- Provides enterprise-grade, agentic document processing API for extracting structured data (fields and line items) from various document types.
- Supports 10+ file formats (.jpeg, .pdf, .docx, .xlsx, etc.) and outputs JSON/Excel with per-field confidence scores.
- Includes quick integration guides for extracting data via file URL or base64 upload, with options for synchronous and asynchronous processing.
- Documents API usage for invoices, receipts, orders, financial and logistics documents; not designed for video or audio transcription.
- Features best practices for credential management, security, error handling, and production use cases.
- 100 free credits monthly for new users; commercial license required for continued use.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部