eahiya / deepseek-ai-laravel
A Laravel package for integrating with the DeepSeek API.
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^9.0|^10.0|^11.0
This package is not auto-updated.
Last update: 2025-07-17 02:47:18 UTC
README
DeepSeek AI Laravel is a Laravel package that provides seamless integration with DeepSeek AI APIs, allowing you to easily interact with AI-powered chat services within your Laravel applications.
Installation
Step 1: Install via Composer
You can install the package using Composer:
composer require eahiya/deepseek-ai-laravel
Step 2: Publish Configuration
Run the following command to publish the package's configuration file:
php artisan vendor:publish --provider="eahiya\DeepSeekAI\DeepSeekAIServiceProvider" --tag="deepseek-config"
Step 3: Set API Key
After publishing the configuration, add your DeepSeek API key to your .env
file:
DEEPSEEK_API_KEY=your-api-key,
Usage
Using the Facade
You can use the DeepSeekAI
facade to interact with the API:
use eahiya\DeepSeekAI\Facades\DeepSeekAI; $response = DeepSeekAI::chat([ ['role' => 'user', 'content' => 'Hello, how are you?'] ],'deepseek-chat'); dd($response);
Using Dependency Injection
You can also use dependency injection to resolve the service:
use eahiya\DeepSeekAI\Services\DeepSeekAIClient; public function someMethod(DeepSeekAIClient $deepSeek) { $response = $deepSeek->chat([ ['role' => 'user', 'content' => 'Hello, how are you?'] ], 'deepseek-chat'); return $response; }
Configuration
The package publishes a configuration file located at config/deepseek.php
. You can customize the API endpoint and other settings there.
License
This package is open-source and licensed under the MIT license.
Contributing
If you'd like to contribute, feel free to submit a pull request or open an issue on GitHub.
Support
For any issues, please open an issue on the GitHub repository or contact support.
Enjoy using DeepSeek AI Laravel! 🚀