- 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
65 lines
3.5 KiB
PHP
65 lines
3.5 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
|
Edit Model Pricing: {{ $model->model_key }}
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-2xl mx-auto sm:px-6 lg:px-8">
|
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
|
<div class="p-6">
|
|
<form method="POST" action="{{ route('model-pricing.update', $model->model_key) }}">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<div class="mb-4">
|
|
<label class="block text-sm font-medium text-gray-700 mb-1">Model Key</label>
|
|
<input type="text" value="{{ $model->model_key }}" disabled
|
|
class="w-full rounded-md border-gray-300 bg-gray-100 shadow-sm">
|
|
<p class="mt-1 text-xs text-gray-500">Model key cannot be changed</p>
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label for="input_price_per_million" class="block text-sm font-medium text-gray-700 mb-1">
|
|
Input Price per Million Tokens *
|
|
</label>
|
|
<input type="number" name="input_price_per_million" id="input_price_per_million"
|
|
value="{{ old('input_price_per_million', $model->input_price_per_million) }}"
|
|
step="0.01" min="0" required
|
|
class="w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
|
|
@error('input_price_per_million')
|
|
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<label for="output_price_per_million" class="block text-sm font-medium text-gray-700 mb-1">
|
|
Output Price per Million Tokens *
|
|
</label>
|
|
<input type="number" name="output_price_per_million" id="output_price_per_million"
|
|
value="{{ old('output_price_per_million', $model->output_price_per_million) }}"
|
|
step="0.01" min="0" required
|
|
class="w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
|
|
@error('output_price_per_million')
|
|
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="flex justify-end space-x-3">
|
|
<a href="{{ route('model-pricing.index') }}"
|
|
class="bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded">
|
|
Cancel
|
|
</a>
|
|
<button type="submit"
|
|
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
|
Update Model Pricing
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|