OCR
Extract text from images
OCR (Optical Character Recognition) extracts text from images.
Quick Start
- Process Image
rust 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
| Format | Extension |
|---|---|
| PNG | .png |
| JPEG | .jpg, .jpeg |
| PDF (scanned) | .pdf |
| TIFF | .tiff |