laravel icon indicating copy to clipboard operation
laravel copied to clipboard

Add OpenAI requests card for Laravel Pulse

Open gehrisandro opened this issue 2 years ago • 0 comments

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

The card supports two metrics:

  • Requests per user: Shows the number of requests per user.
  • Requests per endpoint: Shows the number of requests per endpoint.
<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:

  • [ ] Add tests for Recorder and Livewire card

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

gehrisandro avatar Dec 05 '23 13:12 gehrisandro