openai-php / laravel

⚡️ OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with OpenAI API
MIT License
2.75k stars 185 forks source link

Add OpenAI requests card for Laravel Pulse #78

Open gehrisandro opened 11 months ago

gehrisandro commented 11 months ago

This PR adds a Recorder and Card to integrate in a Laravel Pulse Dashboard.

The card supports two metrics:

<livewire:openai.pulse.requests />

If you want to be specific about the metric to show, you can pass it as type:

<livewire:openai.pulse.requests type="endpoint" />

<livewire:openai.pulse.requests type="user" />

TODOs:

This PR depends on the event dispatching added here.

Card without type specified (type is selectable): CleanShot 2023-12-05 at 13 22 17

Card with type="user": CleanShot 2023-12-05 at 13 21 56

Card with type="endpoint": CleanShot 2023-12-05 at 13 20 48