laravel
laravel copied to clipboard
Add OpenAI requests card for Laravel Pulse
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):
Card with type="user":
Card with type="endpoint":