Skip to main content
OCR (Optical Character Recognition) extracts text from images.

Quick Start

1

Process Image

use praisonai::{Agent, tool};

#[tool]
async fn extract_text(image_path: String) -> String {
    // OCR processing
    ocr::extract(&image_path).await
}

let agent = Agent::new()
    .name("Reader")
    .tool(extract_text)
    .build()?;

agent.chat("Read the text from screenshot.png").await?;

Supported Formats

FormatExtension
PNG.png
JPEG.jpg, .jpeg
PDF (scanned).pdf
TIFF.tiff