Download the PHP package grok-php/laravel without Composer
On this page you can find all versions of the php package grok-php/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download grok-php/laravel
More information about grok-php/laravel
Files in grok-php/laravel
Package laravel
Short Description Seamlessly integrate Grok AI into Laravel applications with an elegant, developer-friendly package. Leverage powerful AI models for chat, automation, and NLP while maintaining Laravel's expressive simplicity.
License MIT
Homepage https://github.com/grok-php/laravel
Informations about the package laravel
๐ง Grok AI Laravel
Seamlessly integrate Grok AI into Laravel applications with an elegant, developer-friendly package.
Leverage powerful AI models for chat, automation, and NLP, while maintaining Laravel's expressive simplicity.
๐ Table of Contents
- โจ Features
- ๐ฆ Installation
- ๐ Quick Start
- Basic Usage
- Advanced Configuration
- ๐ Available Grok AI Models
- โก Streaming Responses
- ๐งช Testing
- ๐ Security
- ๐ค Contributing
- ๐ License
โจ Features
โ
Seamless Laravel Integration โ Works effortlessly with Laravel 10+
โ
Simple API Client โ Access Grok AI models with a fluent, clean syntax
โ
Supports All Grok AI Models โ Choose from multiple LLM & vision models
โ
Streaming Capable โ Enable real-time AI responses for interactive experiences
โ
Configurable Defaults โ Set your preferred model, temperature, and more
๐ฆ Installation
Install via Composer:
After installation, run the setup command:
This command will:
- Publish the configuration file (
config/grok.php
). - Add necessary environment variables to
.env
and.env.example
.
Add your API key in .env
:
๐ Quick Start
Basic Usage
๐ Defaults Used:
Model: grok-2 Temperature: 0.7 Streaming: false
Advanced Configuration
Modify your config/grok.php
file:
๐ You can override any setting dynamically:
๐ Available Grok AI Models
Grok AI offers multiple models, each optimized for different use cases.
These models are available in the Model enum inside our package:
๐ src/Enums/Model.php
Model Enum | API Model Name | Description |
---|---|---|
Model::GROK_VISION_BETA |
grok-vision-beta | Experimental vision-enabled model |
Model::GROK_2_VISION |
grok-2-vision | Advanced multi-modal vision model |
Model::GROK_2_VISION_LATEST |
grok-2-vision-latest | Latest iteration of Grok vision models |
Model::GROK_2_VISION_1212 |
grok-2-vision-1212 | Enhanced vision model with performance improvements |
Model::GROK_2_1212 |
grok-2-1212 | Optimized chat model |
Model::GROK_2 |
grok-2 | Default general-purpose Grok model |
Model::GROK_2_LATEST |
grok-2-latest | Latest iteration of Grok-2 |
Model::GROK_BETA |
grok-beta | Experimental beta model |
๐ Default model used: Model::GROK_2
โก Streaming Responses
Enable real-time AI responses by setting stream: true
:
Streaming is useful for chatbots, assistants, and real-time applications.
๐งช Testing
Run tests using Pest PHP:
๐ Security
If you discover a security vulnerability, please report it via email: ๐ฉ [email protected]
๐ค Contributing
Want to improve this package? Check out CONTRIBUTE.md for contribution guidelines.
๐ License
This package is open-source software licensed under the MIT License.