Download the PHP package bmadigan/overpass without Composer
On this page you can find all versions of the php package bmadigan/overpass. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bmadigan/overpass
More information about bmadigan/overpass
Files in bmadigan/overpass
Package overpass
Short Description A robust Laravel package for integrating Python AI capabilities through a secure subprocess bridge
License MIT
Homepage https://github.com/bmadigan/overpass
Informations about the package overpass
Overpass
A robust Laravel package for integrating Python AI capabilities through a secure subprocess bridge. Instead of reimplementing complex AI libraries in PHP, this package provides a clean interface to delegate AI operations to Python's rich ecosystem (OpenAI, LangChain, scikit-learn, etc.).
๐ฌ Demo Application
Check out Ask-My-Doc - a sophisticated document Q&A system built with Overpass that showcases real-world AI integration:
Ask-My-Doc demonstrates Overpass in action with:
- ๐ Document ingestion and intelligent chunking
- ๐ Semantic search using OpenAI embeddings
- ๐ฌ AI-powered Q&A with source citations
- โก Real-time Python bridge status monitoring
- ๐จ Beautiful dark-themed UI inspired by Linear
Note: This package is not affiliated with the existing decodelabs/overpass package, which provides a PHP bridge to Node.js. Our "Overpass" package serves a different purpose - bridging between PHP and Python for AI operations.
๐ Features
- ๐ Python Integration: Seamlessly execute Python AI scripts from Laravel
- ๐ Secure: API keys passed via environment variables, never in command lines
- โก Async Ready: Built for Laravel queues and background processing
- ๐ก๏ธ Robust Error Handling: Graceful degradation and comprehensive logging
- ๐งช Production Tested: Battle-tested patterns for reliability
- ๐ฏ Laravel Native: Follows Laravel conventions with facades, service providers, and Artisan commands
๐ฆ Installation
You can install the package via composer:
Install the package with example Python scripts:
Publish the config file:
โ๏ธ Configuration
Add your OpenAI API key to your .env file:
Configure the package in config/overpass.php:
๐ฏ Usage
Basic Usage
Chat Operations
Vector Search
Queue Integration
๐ Python Script Structure
Your Python script should follow this pattern:
๐งช Testing
๐ Advanced Usage
Custom Operations
Error Handling
Dependency Injection
๐ง Artisan Commands
๐จ Troubleshooting
Connection Failures:
- Ensure Python 3 is installed and accessible
- Check that your Python script path is correct
- Verify Python dependencies are installed
- Test your OpenAI API key
Performance Issues:
- Increase timeout for complex operations
- Use Laravel queues for long-running tasks
- Consider output length limits
Memory Issues:
- Set appropriate
max_output_lengthin config - Use streaming for large datasets
- Monitor Python process memory usage
๐ Performance Considerations
- Timeouts: Set appropriate timeouts based on operation complexity
- Memory: Monitor both PHP and Python memory usage
- Queues: Use Laravel queues for expensive AI operations
- Caching: Cache embedding results and AI responses when appropriate
๐ Security
- API keys are passed via environment variables, never command line arguments
- All input data is JSON-encoded to prevent injection attacks
- Process isolation ensures Python failures don't crash Laravel
- Comprehensive logging for audit trails
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING for details.
๐ Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
๐ Credits
- Your Name
- All Contributors
๐ License
The MIT License (MIT). Please see License File for more information.
All versions of overpass with dependencies
spatie/laravel-package-tools Version ^1.92
illuminate/contracts Version ^11.0|^12.0
symfony/process Version ^6.0|^7.0
