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
0.5.0

Added

  • Configurable default model via config('extractor.model') / EXTRACTOR_MODEL env var (defaults to gpt-4o-mini)
  • System prompt support — extractions can include a system message for better JSON output quality
    • Configure globally via config('extractor.system_prompt') / EXTRACTOR_SYSTEM_PROMPT env var
    • Override per-extractor via systemPrompt() method
    • Disabled by default (set EXTRACTOR_SYSTEM_PROMPT to enable)
  • New model constants for current OpenAI models:
    • 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 (with automatic parameter handling — uses max_completion_tokens, omits temperature)
    • GPT-4.1 family: GPT_4_1, GPT_4_1_MINI, GPT_4_1_NANO
    • O-series: O4_MINI, O3, O3_MINI, O3_PRO, O1, O1_PRO (with automatic parameter handling for reasoning models)
    • Renamed: GPT_4O, GPT_4O_MINI (cleaner naming)
  • ImageContent detail parameter for OpenAI vision API (low, high, auto)
  • Laravel 13 compatibility
  • JSON response_format now sent with all requests for more reliable structured output
  • Added UPGRADING.md migration guide for breaking changes
  • Added comprehensive tests for HasValidation, HasDto, Contacts extractor, system prompts

Changed

  • BREAKING: Default model changed from gpt-3.5-turbo-1106 to gpt-4o-mini
  • BREAKING: $model, $maxTokens, and $temperature parameters in ExtractorManager methods are now nullable with config/extractor fallback chains
  • BREAKING: Removed legacy OpenAI Completions API support — all requests now use Chat Completions API
  • BREAKING: Engine::extractResponseText() now accepts only ChatResponse and returns string
  • Engine simplified to single chat-only codepath with input-driven vision support
  • Widened openai-php/laravel constraint from ^v0.10.2|^0.11 to >=0.10.2 <1.0 for broader compatibility
  • Feature tests updated to use current model constants

Removed

  • BREAKING: Removed deprecated/shutdown model constants: TEXT_DAVINCI_002, TEXT_DAVINCI_003, GPT_3_TURBO_INSTRUCT, GPT_3_TURBO, GPT_3_TURBO_16K, GPT_3_TURBO_1106, GPT_4, GPT4_32K, GPT_4_1106_PREVIEW, GPT_4_VISION, GPT_O1_MINI, GPT_O1_PREVIEW
  • Removed isCompletionModel(), isJsonModeCompatibleModel(), isHybridModel(), isOhOne() methods from Engine
  • Removed CompletionResponse import and handling from Engine
  • Removed unused Contracts\Engine interface

Deprecated

  • Engine::GPT_4_OMNI — use Engine::GPT_4O instead (will be removed in v0.6.0)
  • Engine::GPT_4_OMNI_MINI — use Engine::GPT_4O_MINI instead (will be removed in v0.6.0)
  • Engine::GPT_4o alias — use Engine::GPT_4O instead (will be removed in v0.6.0)
0.4.0

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
0.3.0

Added

  • Added support for Google Docs exported Word files
  • Added new test case for Google Docs compatibility

Changed

  • Improved Word document extraction reliability with better fallback handling
  • Enhanced Word.php loader implementation with PHPWord integration
  • Improved error handling with proper exception catching
  • Better resource cleanup after document processing
0.2.2

Added

  • Laravel 12 compatibility

Changed

  • Bumped dependencies for Laravel 12 support

Contributors

0.2.1

Fixed

  • Minor bug fix release
0.2.0

Changed

  • Fixed ability to use GPT-4o for vision tasks
  • Deprecated the vision preview model (gpt-4-vision-preview) that no longer works
  • Updated documentation to reference new model

Contributors

0.1.3

Changed

  • Updated dependencies
  • README improvements
0.1.2

Added

  • Support for GPT-4o file handling

Contributors

0.1.1

Changed

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

Added

  • Laravel 11 support
0.0.11

Fixed

  • Fixed broken tests

Changed

  • Removed unused prinsfrank/standards dependency
  • Bumped dependencies:
    • 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
0.0.10

Added

  • Hook to enable deletion of files after processing with Textract (cleanupFileUsing)
  • Hook to customize file path generation (generateFilePathUsing)
  • Added Mockery as dev dependency
0.0.9

Fixed

  • Corrected default value mix-up between textract_version and textract_secret in config
0.0.8

Added

  • Added fromMime($mime, $content) method to Text\Factory for automatic loader selection based on MIME type
0.0.7

Added

  • Support for GPT-4-Vision API
  • ImageContent class for handling image inputs

Changed

  • Bumped symfony/dom-crawler to ^7.0.0
0.0.6

Fixed

  • Fixed OpenAI package installation instructions (config publishing)
0.0.5

Changed

  • Set a default model for extractions
0.0.4

Changed

  • Moved images out of .github folder for better visibility
  • Added example in README header
  • Reorganized README structure

Fixed

  • Removed unused config options (defer to openai package)
0.0.3

Fixed

  • Fixed autoloading configuration
0.0.2

Changed

  • Specify output key via variable in prompts
0.0.1

Added

  • Initial release
  • OpenAI Chat and Completion endpoint wrapper
  • Support for Plain Text, PDF, RTF, Images, Word documents, and Web content
  • Field Extractor for arbitrary data extraction
  • Integration with AWS Textract for OCR
  • JSON Mode support for GPT-3.5 and GPT-4 models
  • Spatie/data DTO integration
  • Built-in extractors: Fields, Contacts, Receipt
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