Initial commit: Runware-powered content generator foundation
Laravel app with a cost-tracked Runware.ai integration (image, video, text generation), a hard monthly EUR budget cap with live USD/EUR FX conversion, and a locally-maintained model/pricing table since Runware's model-search API doesn't expose pricing.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class BudgetExceededException extends RuntimeException
|
||||
{
|
||||
public function __construct(
|
||||
public readonly float $spentEur,
|
||||
public readonly float $capEur,
|
||||
public readonly float $estimatedEur,
|
||||
) {
|
||||
parent::__construct(sprintf(
|
||||
'Runware monthly budget would be exceeded: %.2f€ spent + %.2f€ estimated > %.2f€ cap.',
|
||||
$spentEur,
|
||||
$estimatedEur,
|
||||
$capEur,
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user