Skip to content
/ pdfai Public

PDFAI is a tool to help to extract data from a pdf with GenAI

Notifications You must be signed in to change notification settings

Neime/pdfai

Repository files navigation

PDFAI - Extract Data From PDF with AI

PDFAI is a package to help to extract data from a pdf with GenAI

It's help to upload pdf file and ask to extract data from it.

pdfai-id-card.mov

Installation

make start
make composer c="install"

Usage

$pdfai = new PDFAI(new OpenAIExtractor('your-api-key'));
$dataExtracted = $pdfai->extract(['name', 'firstname'], './file.pdf');

Website Localhost

(only for endtoend test) http://localhost:8080/

Run Test

Run PhpUnit

Add .env with your openai API key

OPENAI_API_KEY=your-api-key
make unit c="tests"

Test get pdf content

  1. Run docker to open access to tests/endtoend/index.php in http://localhost:8080/

  2. Open tests/endtoend/index.html in navigator

  3. Upload a file and ask data to be extract

  4. wait response

About

PDFAI is a tool to help to extract data from a pdf with GenAI

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published