lumina-ai-inc/chunkr

GitHub: lumina-ai-inc/chunkr

Chunkr 是一款开源文档智能处理服务,通过版面分析、OCR 和语义分块将复杂文档转化为 RAG/LLM 可用的结构化数据。

Stars: 4037 | Forks: 263


Chunkr Logo

Chunkr | 开源文档智能 API

Production-ready service for document layout analysis, OCR, and semantic chunking.
Convert PDFs, PPTs, Word docs & images into RAG/LLM-ready chunks.

Layout Analysis | OCR + Bounding Boxes | Structured HTML & Markdown | Vision-Language Model Processing

👉 Note: The open-source AGPL version is **different** from our fully managed Cloud API. The open-source release uses community/open-source models, while the Cloud API runs **proprietary in-house models** for higher accuracy, speed, and enterprise reliability.

Try it out     Report Bug     Contact     Discord     Ask DeepWiki

Chunkr Cloud API
## 目录 - [目录](#table-of-contents) - [(超级)快速开始](#super-quick-start) - [文档](#documentation) - [开源版 vs Cloud API vs 企业版](#open-source-vs-cloud-api-vs-enterprise) - [使用 Docker Compose 快速开始](#quick-start-with-docker-compose) - [LLM 配置](#llm-configuration) - [使用 models.yaml(推荐)](#using-modelsyaml-recommended) - [使用环境变量(基础)](#using-environment-variables-basic) - [常见 LLM API 提供商](#common-llm-api-providers) - [许可协议](#licensing) - [联系我们](#connect-with-us) ## 开源版 vs Cloud API vs 企业版 | 功能 | 开源仓库 (良好) | Cloud API - chunkr.ai (最佳) | 企业版 | |---------|--------------------|------------------------|------------| | **最适用场景** | 开发与测试 | 生产工作负载 | 大规模 / 高安全 | | **布局分析** | 使用开源模型 | 专有内部模型 | 内部模型 + 定制微调 | | **OCR 准确度** | 社区 OCR 引擎 | 优化的 OCR 技术栈 | 优化 + 特定领域微调 | | **VLM 处理** | 基础开源 VLM | 增强型专有 VLM | 定制微调 | | **Excel 支持** | ❌ | ✅ 原生解析器 | ✅ 原生解析器 | | **文档类型** | PDF, PPT, Word, 图像 | PDF, PPT, Word, 图像, Excel | PDF, PPT, Word, 图像, Excel | | **基础设施** | 自托管 | 完全托管的云服务 | 托管 / 本地部署 | | **技术支持** | Discord 社区 | 专属支持 | 专属创始团队 | | **迁移支持** | 社区驱动 | 文档 + 邮件 | 专属迁移团队 | 如果您希望获得透明度、进行本地托管,或者尝试 Chunkr 的 pipeline,**开源版本**是理想之选。 为了获得**最佳性能、生产级的可靠性以及使用内部模型的权限**,我们推荐使用 Chunkr Cloud API。 针对**高安全性或受监管的行业**,我们的**企业版**提供本地或 VPC 部署方案。 ## 使用 Docker Compose 快速开始 1. 前置条件: - [Docker 和 Docker Compose](https://docs.docker.com/get-docker/) - [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)(用于 GPU 支持,可选) 2. 克隆仓库: ``` git clone https://github.com/lumina-ai-inc/chunkr cd chunkr ``` 3. 配置环境变量: ``` # 复制示例环境文件 cp .env.example .env # 配置你的 llm models cp models.example.yaml models.yaml ``` 有关如何配置 LLM 的更多信息,请参见[这里](#llm-configuration)。 4. 启动服务: ``` # 对于 GPU deployment: docker compose up -d # 对于 CPU-only deployment: docker compose -f compose.yaml -f compose.cpu.yaml up -d # 对于 Mac ARM architecture (M1, M2, M3, etc.): docker compose -f compose.yaml -f compose.cpu.yaml -f compose.mac.yaml up -d ``` 5. 访问服务: - Web UI: `http://localhost:5173` - API: `http://localhost:8000` 6. 完成后停止服务: ``` # 对于 GPU deployment: docker compose down # 对于 CPU-only deployment: docker compose -f compose.yaml -f compose.cpu.yaml down # 对于 Mac ARM architecture (M1, M2, M3, etc.): docker compose -f compose.yaml -f compose.cpu.yaml -f compose.mac.yaml down ``` ## LLM 配置 Chunkr 支持两种配置 LLM 的方式: 1. **models.yaml 文件**:用于多个 LLM 的高级配置,提供额外选项 2. **环境变量**:用于单个 LLM 的简单配置 ### 使用 models.yaml(推荐) 如需更灵活地配置多个模型、默认/回退选项以及速率限制: 1. 复制示例文件以创建您的配置: ``` cp models.example.yaml models.yaml ``` 2. 编辑 models.yaml 文件进行配置。示例: ``` models: - id: gpt-4o model: gpt-4o provider_url: https://api.openai.com/v1/chat/completions api_key: "your_openai_api_key_here" default: true rate-limit: 200 # requests per minute - optional ``` 使用 models.yaml 的好处: - 同时配置多个 LLM 提供商 - 设置默认和回退模型 - 为每个模型添加分布式速率限制 - 在 API 请求中通过 ID 引用模型(详见文档) ### 使用环境变量(基础) 您可以通过在 .env 文件中设置以下变量,来使用任何兼容 OpenAI API 的 endpoint: ``` LLM__KEY: LLM__MODEL: LLM__URL: ``` ### 常见 LLM API 提供商 下表列出了常见的 LLM 提供商及其配置详细信息,以帮助您快速入门: | 提供商 | API URL | 文档 | | ---------------- | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | | OpenAI | https://api.openai.com/v1/chat/completions | [OpenAI 文档](https://platform.openai.com/docs) | | Google AI Studio | https://generativelanguage.googleapis.com/v1beta/openai/chat/completions | [Google AI 文档](https://ai.google.dev/gemini-api/docs/openai) | | OpenRouter | https://openrouter.ai/api/v1/chat/completions | [OpenRouter 模型](https://openrouter.ai/models) | | 自托管 | http://localhost:8000/v1 | [VLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) 或 [Ollama](https://ollama.com/blog/openai-compatibility) | ## 许可协议 本项目的核心采用双重许可协议: 1. [GNU Affero General Public License v3.0 (AGPL-3.0)](LICENSE) 2. 商业许可证 若要在不受 AGPL-3.0 许可条款约束的情况下使用 Chunkr,您可以[联系我们](mailto:mehul@chunkr.ai)或访问我们的[网站](https://chunkr.ai)。 ## 联系我们 - 📧 电子邮件:[mehul@chunkr.ai](mailto:mehul@chunkr.ai) - 📅 预约通话:[预约 30 分钟会议](https://cal.com/mehulc/30min) - 🌐 访问我们的网站:[chunkr.ai](https://chunkr.ai)
标签:DLL 劫持, OCR, Petitpotam, RAG, 大语言模型, 文档解析, 版权保护, 版面分析, 请求拦截, 逆向工具, 通知系统