- Any-LLM Gateway setup with Docker Compose - Laravel 11 admin interface with Livewire - Dashboard with usage statistics and charts - Gateway Users management with budget tracking - API Keys management with revocation - Budget templates with assignment - Usage Logs with filtering and CSV export - Model Pricing management with calculator - PostgreSQL database integration - Complete authentication system for admins
97 lines
5.5 KiB
PHP
97 lines
5.5 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<div class="flex justify-between items-center">
|
|
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
|
Model Pricing
|
|
</h2>
|
|
<div class="flex space-x-2">
|
|
<a href="{{ route('model-pricing.calculator') }}"
|
|
class="bg-purple-500 hover:bg-purple-700 text-white font-bold py-2 px-4 rounded">
|
|
Cost Calculator
|
|
</a>
|
|
<a href="{{ route('model-pricing.import-form') }}"
|
|
class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded">
|
|
Import CSV
|
|
</a>
|
|
<a href="{{ route('model-pricing.create') }}"
|
|
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
|
Add New Model
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
|
@if(session('success'))
|
|
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative mb-4">
|
|
{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
|
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
|
<div class="p-6 text-gray-900">
|
|
@if($modelPricing->count() > 0)
|
|
<table class="min-w-full divide-y divide-gray-200">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
Model
|
|
</th>
|
|
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
Input Price
|
|
</th>
|
|
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
Output Price
|
|
</th>
|
|
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
Actions
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-white divide-y divide-gray-200">
|
|
@foreach($modelPricing as $model)
|
|
<tr>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
|
|
{{ $model->model_key }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-right text-blue-600 font-semibold">
|
|
{{ $model->input_price_formatted }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-right text-green-600 font-semibold">
|
|
{{ $model->output_price_formatted }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
|
<a href="{{ route('model-pricing.edit', $model->model_key) }}"
|
|
class="text-indigo-600 hover:text-indigo-900 mr-3">Edit</a>
|
|
<form action="{{ route('model-pricing.destroy', $model->model_key) }}"
|
|
method="POST" class="inline"
|
|
onsubmit="return confirm('Are you sure?');">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="text-red-600 hover:text-red-900">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="mt-4">
|
|
{{ $modelPricing->links() }}
|
|
</div>
|
|
@else
|
|
<div class="text-center py-12">
|
|
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
</svg>
|
|
<h3 class="mt-2 text-sm font-medium text-gray-900">No model pricing found</h3>
|
|
<p class="mt-1 text-sm text-gray-500">Get started by adding a new model pricing.</p>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|