Skip to content

slider23/laravel-openrouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel OpenRouter


Latest Version on Packagist

This Laravel package provides an easy-to-use interface for integrating OpenRouter into your Laravel applications. OpenRouter is a unified interface for Large Language Models (LLMs) that allows you to interact with various AI models through a single API.

Table of Contents

🤖 Requirements

  • PHP 8.1 or higher

🏁 Get Started

You can install the package via composer:

composer require moe-mizrak/laravel-openrouter

You can publish the config file with:

php artisan vendor:publish --provider="MoeMizrak\LaravelOpenRouter\OpenRouterServiceProvider"

This is the contents of the published config file:

return [
    'api_endpoint' => env('OPENROUTER_API_ENDPOINT', 'https://openrouter.ai/api/v1/'),
    'api_key'      => env('OPENROUTER_API_KEY'),
];

⚙️ Configuration

After publishing the package configuration file, you'll need to add the following environment variables to your .env file:

OPENROUTER_API_ENDPOINT=https://openrouter.ai/api/v1/
OPENROUTER_API_KEY=your_api_key

🎨 Usage

// TODO: Add usage instructions and examples

📜 License

Laravel OpenRouter is an open-sourced software licensed under the MIT license.

About

Laravel package for OpenRouter (A unified interface for LLMs)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%