Rename project from any-llm to laravel-llm

- Remove old any-llm related files (Dockerfile, config.yml, web/, setup-laravel.sh)
- Update README.md with new Laravel LLM Gateway documentation
- Keep docker-compose.yml with laravel-llm container names
- Clean project structure for Laravel-only implementation
This commit is contained in:
wtrinkl
2025-11-18 22:05:05 +01:00
parent b1363aeab9
commit bef36c7ca2
33 changed files with 1341 additions and 2930 deletions

View File

@@ -2,47 +2,61 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Budget extends Model
{
use HasFactory;
protected $table = 'budgets';
protected $primaryKey = 'budget_id';
public $incrementing = false;
protected $keyType = 'string';
protected $fillable = [
'budget_id',
'max_budget',
'budget_duration_sec',
'name',
'monthly_limit',
'daily_limit',
'created_by',
];
protected function casts(): array
protected $casts = [
'monthly_limit' => 'decimal:2',
'daily_limit' => 'decimal:2',
];
/**
* Get formatted max budget display
*/
public function getMaxBudgetFormattedAttribute(): string
{
return [
'max_budget' => 'double',
'budget_duration_sec' => 'integer',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
if ($this->monthly_limit) {
return '$' . number_format($this->monthly_limit, 2);
}
if ($this->daily_limit) {
return '$' . number_format($this->daily_limit, 2) . '/day';
}
return 'Unlimited';
}
/**
* Get human-readable duration
*/
public function getDurationHumanAttribute(): string
{
if ($this->monthly_limit && $this->daily_limit) {
return 'Monthly';
}
if ($this->daily_limit && !$this->monthly_limit) {
return 'Daily';
}
return 'Unlimited';
}
public function gatewayUsers()
{
return $this->hasMany(GatewayUser::class, 'budget_id', 'budget_id');
}
public function getMaxBudgetFormattedAttribute()
{
return '$' . number_format($this->max_budget, 2);
}
public function getDurationHumanAttribute()
{
if (!$this->budget_duration_sec) return 'No limit';
$days = floor($this->budget_duration_sec / 86400);
$hours = floor(($this->budget_duration_sec % 86400) / 3600);
return "{$days}d {$hours}h";
}
}