[
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to `deepseek-laravel` will be documented in this file\n\n## 1.0.0 - 201X-XX-XX\n\n- initial release\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nContributions are **welcome** and will be fully **credited**.\n\nPlease read and understand the contribution guide before creating an issue or pull request.\n\n## Etiquette\n\nThis project is open source, and as such, the maintainers give their free time to build and maintain the source code\nheld within. They make the code freely available in the hope that it will be of use to other developers. It would be\nextremely unfair for them to suffer abuse or anger for their hard work.\n\nPlease be considerate towards maintainers when raising issues or presenting pull requests. Let's show the\nworld that developers are civilized and selfless people.\n\nIt's the duty of the maintainer to ensure that all submissions to the project are of sufficient\nquality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.\n\n## Viability\n\nWhen requesting or submitting new features, first consider whether it might be useful to others. Open\nsource projects are used by many developers, who may have entirely different needs to your own. Think about\nwhether or not your feature is likely to be used by other users of the project.\n\n## Procedure\n\nBefore filing an issue:\n\n- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.\n- Check to make sure your feature suggestion isn't already present within the project.\n- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.\n- Check the pull requests tab to ensure that the feature isn't already in progress.\n\nBefore submitting a pull request:\n\n- Check the codebase to ensure that your feature doesn't already exist.\n- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.\n\n## Requirements\n\nIf the project maintainer has any additional requirements, you will find them listed here.\n\n- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).\n\n- **Add tests!** - Your patch won't be accepted if it doesn't have tests.\n\n- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.\n\n- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.\n\n- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.\n\n- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.\n\n**Happy coding**!\n"
  },
  {
    "path": "LICENSE.md",
    "content": "MIT License\n\nCopyright (c) deepseek-php\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# Deepseek Laravel\n\nLaravel wrapper for **[Deepseek PHP client](https://github.com/deepseek-php/deepseek-php-client)** to seamless [deepseek AI](https://www.deepseek.com) API integration with Laravel applications.\n\n## Table of Contents\n\n- [Installation](#installation)\n  - [Publishing Configuration File](#publishing-configuration-file)\n- [Usage](#usage)\n  - [Basic Usage](#basic-usage)\n  - [Advanced Usage](#advanced-usage)\n- [Testing](#testing)\n- [Contributors](#contributors-)\n- [Changelog](#changelog)\n- [Security](#security)\n- [License](#license)\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require deepseek-php/deepseek-laravel\n```\n\n### Publishing Configuration File\n\n```bash\nphp artisan vendor:publish --tag=deepseek\n```\nthen add token to `.env` file\n```php\nDEEPSEEK_API_KEY=\"your_api_key\"\n```\n\n## Usage\n\n### Basic Usage\n\n```php\nuse DeepSeekClient;\n\n$deepseek = app(DeepSeekClient::class);\n$response = $deepseek->query('Hello deepseek, I am Laravel Framework , how are you Today ^_^ ?')->run();\nprint_r(\"deepseek API response : \" . $response);\n```\n\n**Note**: In easy mode, it will take defaults for all configs [Check Default Values](https://github.com/deepseek-php/deepseek-php-client/blob/master/src/Enums/Configs/DefaultConfigs.php)\n\n### Advanced Usage\n\n```php\nuse DeepSeekClient;\n\n$deepseek = app(DeepSeekClient::class);\n\n// Another way, with customization\n$response = $deepseek\n    ->query('Hello deepseek, how are you ?', 'system')\n    ->query('Hello deepseek, my name is PHP ', 'user')\n    ->withModel(\"deepseek-chat\")\n    ->setTemperature(1.5)\n    ->run();\n\nprint_r(\"deepseek API response : \" . $response);\n```\n\n## Testing\n\nTests will come soon\n\n## Contributors ✨\n\nThanks to these wonderful people for contributing to this project! 💖\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://github.com/omaralalwi\">\n        <img src=\"https://avatars.githubusercontent.com/u/25439498?v=4\" width=\"70px;\" alt=\"Omar AlAlwi\"/>\n        <br />\n        <sub><b>Omar AlAlwi</b></sub>\n      </a>\n      <br />\n      🏆 Creator\n    </td>\n      <td align=\"center\">\n      <a href=\"https://github.com/A909M\">\n        <img src=\"https://avatars.githubusercontent.com/u/119125167?v=4\" width=\"70px;\" alt=\"Asim Al-Wasai\"/>\n        <br />\n        <sub><b> Assem Alwaseai </b></sub>\n      </a>\n      <br />\n      💻 Contributor\n    </td>\n    <!-- Contributors -->\n    </td>\n      <td align=\"center\">\n      <a href=\"https://github.com/200-0K\">\n        <img src=\"https://avatars.githubusercontent.com/u/38166228?v=4\" width=\"70px;\" alt=\"Faisal\"/>\n        <br />\n        <sub><b> Faisal </b></sub>\n      </a>\n      <br />\n      💻 Contributor\n    </td>\n    <!-- Contributors -->\n  </tr>\n</table>\n\nWant to contribute? Check out the [contributing guidelines](./CONTRIBUTING.md) and submit a pull request! 🚀\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n---\n<div>\n\n# 🐘✨ **DeepSeek PHP Community** ✨🐘\n\nClick the button bellow or [join here](https://t.me/deepseek_php_community) to be part of our growing community!\n\n[![Join Telegram](https://img.shields.io/badge/Join-Telegram-blue?style=for-the-badge&logo=telegram)](https://t.me/deepseek_php_community)\n\n\n### **Channel Structure** 🏗️\n- 🗨️ **General** - Daily chatter\n- 💡 **Ideas & Suggestions** - Shape the community's future\n- 📢 **Announcements & News** - Official updates & news\n- 🚀 **Releases & Updates** - Version tracking & migration support\n- 🐞 **Issues & Bug Reports** - Collective problem-solving\n- 🤝 **Pull Requests** - Code collaboration & reviews\n\n</div>\n\n---\n### Security\n\nIf you discover any security-related issues, please email [omaralwi2010@gmail.com](mailto:omaralwi2010@gmail.com) instead of using the issue tracker.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"deepseek-php/deepseek-laravel\",\n    \"description\": \"A seamless Laravel integration for the Deepseek PHP client, enabling effortless interaction with the Deepseek API in your Laravel applications.\",\n    \"keywords\": [\n        \"deepseek-php\",\n        \"deepseek-laravel\",\n        \"deepseek-coder\",\n        \"DeepSeek-R1\",\n        \"DeepSeek-R1-Zero\",\n        \"deepseek-chat\",\n        \"deepseek-math\",\n        \"deepseek-php-client\",\n        \"deepseek-api\",\n        \"laravel-ai\",\n        \"laravel-deepseek\",\n        \"deepseek-package\",\n        \"php-deepseek\",\n        \"deepseek-integration\",\n        \"deepseek-integration\",\n        \"openai\"\n    ],\n    \"homepage\": \"https://github.com/deepseek-php/deepseek-laravel\",\n    \"license\": \"MIT\",\n    \"type\": \"library\",\n    \"version\": \"2.0.2\",\n    \"authors\": [\n        {\n            \"name\": \"deepseek-php\",\n            \"email\": \"omaralwi2010@gmail.com\",\n            \"role\": \"Owner\"\n        },\n        {\n            \"name\": \"Omar Alalwi\",\n            \"email\": \"omaralwi2010@gmail.com\",\n            \"role\": \"creator\"\n        }\n    ],\n    \"require\": {\n        \"php\": \"^8.1.0\",\n        \"deepseek-php/deepseek-php-client\": \"^2.0\",\n        \"illuminate/support\": \"^9.0|^10.0|^11.0|^12.0\",\n        \"nyholm/psr7\": \"^1.8\",\n        \"symfony/http-client\": \"^7.2\"\n    },\n    \"require-dev\": {\n        \"orchestra/testbench\": \"^7.0|^8.0\",\n        \"phpunit/phpunit\": \"^9.0|^10.0\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"DeepSeek\\\\DeepseekLaravel\\\\\": \"src\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"DeepSeek\\\\DeepseekLaravel\\\\Tests\\\\\": \"tests\"\n        }\n    },\n    \"scripts\": {\n        \"test\": \"vendor/bin/phpunit\",\n        \"test-coverage\": \"vendor/bin/phpunit --coverage-html coverage\"\n    },\n    \"config\": {\n        \"sort-packages\": true,\n        \"allow-plugins\": {\n            \"php-http/discovery\": true\n        }\n    },\n    \"extra\": {\n        \"laravel\": {\n            \"providers\": [\n                \"DeepSeek\\\\DeepseekLaravel\\\\DeepseekLaravelServiceProvider\"\n            ],\n            \"aliases\": {\n                \"DeepseekLaravel\": \"DeepSeek\\\\DeepseekLaravel\\\\DeepseekLaravelFacade\"\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "config/deepseek.php",
    "content": "<?php\n\nuse DeepSeek\\Enums\\Configs\\DefaultConfigs;\n\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | API Key\n    |--------------------------------------------------------------------------\n    |\n    | The API key used to authenticate requests to the Deepseek API. This key\n    | is required for all API interactions. Ensure that you set this value in\n    | your environment file (.env) as DEEPSEEK_API_KEY to keep it secure.\n    |\n    */\n    'api_key' => env('DEEPSEEK_API_KEY'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Base URL\n    |--------------------------------------------------------------------------\n    |\n    | The base URL for the Deepseek API. By default, it uses the value defined\n    | in DefaultConfigs::BASE_URL. You can override this by setting the\n    | DEEPSEEK_API_BASE_URL variable in your environment file if you need to\n    | connect to a custom endpoint.\n    |\n    */\n    'base_url' => env('DEEPSEEK_API_BASE_URL', (string) DefaultConfigs::BASE_URL->value),\n\n    /*\n    |--------------------------------------------------------------------------\n    | API Timeout\n    |--------------------------------------------------------------------------\n    |\n    | The maximum time, in seconds, for API requests to complete before timing\n    | out. This helps prevent your application from waiting indefinitely for\n    | a response. The default value is taken from DefaultConfigs::TIMEOUT.\n    | You can override it in the environment file by setting DEEPSEEK_API_TIMEOUT.\n    |\n    */\n    'timeout' => env('DEEPSEEK_API_TIMEOUT', (int) DefaultConfigs::TIMEOUT->value),\n\n];\n"
  },
  {
    "path": "src/DeepseekLaravelFacade.php",
    "content": "<?php\n\nnamespace DeepSeek\\DeepseekLaravel;\n\nuse Illuminate\\Support\\Facades\\Facade;\n\nclass DeepseekLaravelFacade extends Facade\n{\n    /**\n     * Get the registered name of the component.\n     *\n     * @return string\n     */\n    protected static function getFacadeAccessor()\n    {\n        return 'deepseek-laravel';\n    }\n}\n"
  },
  {
    "path": "src/DeepseekLaravelServiceProvider.php",
    "content": "<?php\n\nnamespace DeepSeek\\DeepseekLaravel;\n\nuse DeepSeek\\DeepSeekClient;\nuse Illuminate\\Support\\ServiceProvider;\nuse DeepSeek\\DeepseekLaravel\\Exceptions\\ApiKeyIsMissing;\n\nclass DeepseekLaravelServiceProvider extends ServiceProvider\n{\n    public function boot()\n    {\n        if ($this->app->runningInConsole()) {\n            $this->publishes([\n                __DIR__.'/../config/deepseek.php' => config_path('deepseek.php'),\n            ], 'deepseek');\n\n        }\n    }\n\n    /**\n     * Register the application services.\n     */\n    public function register()\n    {\n        $this->mergeConfigFrom(__DIR__.'/../config/deepseek.php', 'deepseek');\n\n        $this->app->singleton(DeepSeekClient::class, function () {\n            $apiKey = config('deepseek.api_key');\n            $baseUrl = config('deepseek.base_url');\n            $timeout = config('deepseek.timeout');\n\n            if (! is_string($apiKey)) {\n                throw ApiKeyIsMissing::create();\n            }\n\n            return DeepSeekClient::build($apiKey, $baseUrl, $timeout);\n        });\n    }\n}\n"
  },
  {
    "path": "src/Exceptions/ApiKeyIsMissing.php",
    "content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace DeepSeek\\DeepseekLaravel\\Exceptions;\n\nuse InvalidArgumentException;\n\n/**\n * @internal\n */\nfinal class ApiKeyIsMissing extends InvalidArgumentException\n{\n    /**\n     * Create a new exception instance.\n     */\n    public static function create(): self\n    {\n        return new self(\n            'The Deepseek API key is not set. Please ensure `DEEPSEEK_API_KEY` is configured in your .env file.',\n        );\n    }\n}\n"
  },
  {
    "path": "tests/Feature/DeepseekLaravelTest.php",
    "content": "<?php\n\nnamespace Feature;\n\nuse DeepSeekClient;\nuse DeepSeek\\Enums\\Configs\\DefaultConfigs;\nuse Illuminate\\Support\\Facades\\Config;\nuse Orchestra\\Testbench\\TestCase;\n\nclass DeepseekLaravelTest extends TestCase\n{\n    /** @test */\n    public function it_can_query_using_the_deepseek_client()\n    {\n        // soon\n    }\n\n    /** @test */\n    public function it_uses_default_configurations()\n    {\n        // soon\n    }\n}\n"
  }
]