Files

30 lines
695 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AiProvider extends Model
{
use HasFactory;
// 'youtube' isn't an AI provider, but reuses this same credentials
// shape: api_key holds an OAuth refresh_token, config holds
// client_id/client_secret. See YoutubePublishHandler.
public const PROVIDERS = ['openai', 'stability_ai', 'elevenlabs', 'youtube', 'other'];
protected $fillable = [
'name',
'provider',
'api_key',
'config',
'is_active',
];
protected $casts = [
'config' => 'array',
'is_active' => 'boolean',
];
}