Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Extractor Laravel Package

helgesverre/extractor

View on GitHub
Deep Wiki
Context7
v0.5.0

What's New

Model Support

  • Complete GPT-5 family: GPT_5_4, GPT_5_4_PRO, GPT_5_3, GPT_5_2, GPT_5_2_PRO, GPT_5_1, GPT_5, GPT_5_PRO, GPT_5_MINI, GPT_5_NANO
  • GPT-4.1 family: GPT_4_1, GPT_4_1_MINI, GPT_4_1_NANO
  • O-series reasoning models: O4_MINI, O3, O3_MINI, O3_PRO, O1, O1_PRO
  • Automatic parameter handling for GPT-5 and O-series models — max_completion_tokens used instead of max_tokens, temperature omitted automatically
  • Renamed: GPT_4O, GPT_4O_MINI (cleaner naming, old aliases deprecated)

Features

  • Configurable default model via EXTRACTOR_MODEL env var (defaults to gpt-4o-mini)
  • System prompt support — configure globally or per-extractor
  • ImageContent detail parameter for OpenAI vision API (low, high, auto)
  • JSON response_format sent with all requests for reliable structured output
  • Laravel 13 compatibility
  • Widened openai-php/laravel constraint to support v0.10.2 through v0.19+

Breaking Changes

  • Default model changed from gpt-3.5-turbo-1106 to gpt-4o-mini
  • $model, $maxTokens, $temperature parameters are now nullable with config fallback chains
  • Removed legacy OpenAI Completions API support — chat-only
  • Removed deprecated model constants (TEXT_DAVINCI_*, GPT_3_*, GPT_4_VISION, etc.)
  • Removed isCompletionModel(), isJsonModeCompatibleModel(), isHybridModel(), isOhOne() methods
  • PHP 8.3+ required

See UPGRADING.md for a full migration guide.

Integration Tested

All model families verified against the live OpenAI API:

Model Status
gpt-4o, gpt-4o-mini
gpt-5, gpt-5-mini, gpt-5-nano
gpt-5.1, gpt-5.2, gpt-5.4
gpt-5-mini (vision)
o3-mini, o4-mini, o1
v0.4.0

What's Changed

Added

  • Added declare(strict_types=1) to all source files for improved type safety
  • Added comprehensive test suite with 127+ tests covering Engine, ExtractorManager, Extractors, and Text loaders
  • Added Laravel 10/11/12 integration test script (test-laravel-install.sh)
  • Added file size validation in Word loader (50MB limit)
  • Added proper error messages for vision model input validation
  • Added justfile for simplified development commands
  • Added CONTRIBUTING.md with contributor guidelines
  • Added pint.json for consistent code formatting configuration
  • Added support for custom OpenAI API endpoints (Ollama, Together.ai, Groq, Azure)

Changed

  • Improved JSON decode error handling with json_last_error_msg() for better debugging
  • Fixed Factory::fromMime() rescue fallbacks to use lazy evaluation (closures)
  • Fixed loose equality operators (==) to strict equality (===) in ImageContent
  • Improved temp file cleanup with try-finally blocks in Word loader
  • Updated temp file prefixes from legacy names to extractor_*
  • Fixed Extractor::prompt() to explicitly call ->render() on View objects
  • Reorganized test structure into Unit/Feature/Integration directories
  • Updated CLAUDE.md with comprehensive architecture documentation

Fixed

  • Fixed placeholder exception message in Engine.php for vision model errors
  • Fixed eager evaluation bug in Factory::fromMime() fallback handling

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.3.0...v0.4.0

v0.3.0

v0.3.0 - Enhanced Word Document Extraction

Features & Improvements

  • Improved Word document extraction reliability with better fallback handling
  • Added support for Google Docs exported Word files
  • Better error handling and resource cleanup in Word document processing

Testing

  • Added new test case for Google Docs compatibility
  • All existing tests pass with improved implementation

Technical Details

  • Enhanced Word.php loader implementation
  • Improved error handling with proper exception catching
  • Better resource cleanup after document processing

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.2.2...v0.3.0

v0.2.2
v0.2.0
  • Fixed ability to use gpt-4o for vision tasks, deprecated the vision preview model that no longer works, updated docs to reference new model. Thanks to [@blorange2](https://github.com/blorange2) for providing a fix

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.3...v0.2.0

v0.1.3

Updated dependancies and changed stuff in the readme.

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.2...v0.1.3

v0.1.2

What's Changed

New Contributors

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.1...v0.1.2

v0.1.1

Changes

  • Bumped smalot/pdfparser from v2.9.0 to ^2.10

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.0...v0.1.1

v0.1.0

Add support for Laravel 11

v0.0.11

What's Changed

  • Fixed broken tests
  • Removed prinsfrank/standards from dependancies, it was not used.
  • Bumped the following dependancies:
Package Name Old Version New Version
league/flysystem-aws-s3-v3 ^3.16 ^3.22.0
openai-php/laravel ^0.7.0 ^v0.8.1
smalot/pdfparser * v2.8.0
spatie/laravel-data ^3.9 ^3.11.0
spatie/laravel-package-tools ^1.14.0 ^1.16.2

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.10...v0.0.11

v0.0.10

What's Changed

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.9...v0.0.10

v0.0.9

Changes

  • fixes #3 - Corrected a mistake related to the default value of textract_version and textract_secret in config/extractor.php.

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.8...v0.0.9

v0.0.8

Changes

  • added method fromMime($mime, $content in HelgeSverre\Extractor\Text\Factory::class

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.7...v0.0.8

v0.0.7

Changes

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.6...v0.0.7

v0.0.6

Changes

  • Updated the installation instructions for openai.

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.5...v0.0.6

v0.0.5

Changes

  • Set gpt-3.5-turbo-1106 as the default model.

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.4...v0.0.5

v0.0.4

Changes

  • Removed unused configuration option from config/extractor.php
  • Improved readme.

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.3...v0.0.4

v0.0.3

Changes:

  • Fixed broken composer.json config that causes the autoloader and Extractor facade to not be loaded correctly, gotta be careful with that "rename" refactor feature in PhpStorm apparently...

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.2...v0.0.3

v0.0.2

Changes

  • Added missing $outputKey in builtin prompt
  • Removed unused blade file
  • Removed duplicate text in readme and fixed mistake in example

Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.1...v0.0.2

v0.0.1

Pre-release.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
althinect/enum-permission
andydefer/laravel-actions
aimeos/prisma
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor