Skip to content

Add support for kreuzberg#38

Merged
p-j-smith merged 21 commits intomainfrom
paul/add-kreuzberg
Oct 7, 2025
Merged

Add support for kreuzberg#38
p-j-smith merged 21 commits intomainfrom
paul/add-kreuzberg

Conversation

@p-j-smith
Copy link
Copy Markdown
Collaborator

Fixes #37

  • add a package pybonb/packages/ocr/kreuzberg that launches the kreuzberg rest API
  • add this package as a uv workspace member (so you can install it with uv sync --extra kreuzberg
  • add a router for kreuzberg to the forwarding API
  • add a kreuzberg docker service
  • add tests for the kreuzberg-ocr/inference_single endpoint and healthchecks

@p-j-smith p-j-smith requested a review from Copilot October 6, 2025 14:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the Kreuzberg OCR service to the pyonb project. It implements a new OCR option alongside existing services like marker, paddleocr, sparrow, and docling.

  • Creates a new pyonb-kreuzberg package with Docker support and API integration
  • Adds routing capabilities for Kreuzberg through the forwarding API
  • Implements comprehensive test coverage for health checks and inference endpoints

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/api/test_routers.py Adds health check and inference tests for Kreuzberg OCR
tests/api/test_app.py Includes Kreuzberg container in health check tests
tests/.env.tests Adds Kreuzberg API port configuration
src/api/requirements.txt Adds aiohttp dependency for async HTTP requests
src/api/app/routers/kreuzberg.py Implements Kreuzberg router with health and inference endpoints
src/api/app/main.py Registers Kreuzberg router and improves logging
pyproject.toml Configures workspace and optional dependencies
packages/ocr/kreuzberg/src/pyonb_kreuzberg/api.py Main API implementation using Litestar
packages/ocr/kreuzberg/src/pyonb_kreuzberg/__init__.py Package initialization
packages/ocr/kreuzberg/pyproject.toml Package configuration
packages/ocr/kreuzberg/README.md Documentation for setup and usage
packages/ocr/kreuzberg/Dockerfile Docker container configuration
docker-compose.yml Adds Kreuzberg service definition
.env.sample Updates environment variable template
Comments suppressed due to low confidence (1)

src/api/app/routers/kreuzberg.py:1

  • The KREUZBERG_API_PORT environment variable is a string, but uvicorn.run() expects an integer for the port parameter. This should be converted using int(KREUZBERG_API_PORT).
"""Routers for Kreuzberg OCR."""

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

p-j-smith and others added 2 commits October 7, 2025 10:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@p-j-smith p-j-smith merged commit 7c3dc0b into main Oct 7, 2025
3 checks passed
@p-j-smith p-j-smith mentioned this pull request Oct 7, 2025
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.

Add support for Kreuzberg

3 participants