27 lines
782 B
PHP
27 lines
782 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Api;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class GuestAiEditStoreRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'style_key' => ['nullable', 'string', 'max:120', 'required_without:prompt'],
|
|
'prompt' => ['nullable', 'string', 'max:2000', 'required_without:style_key'],
|
|
'negative_prompt' => ['nullable', 'string', 'max:2000'],
|
|
'provider_model' => ['nullable', 'string', 'max:120'],
|
|
'idempotency_key' => ['nullable', 'string', 'max:120'],
|
|
'session_id' => ['nullable', 'string', 'max:191'],
|
|
'metadata' => ['nullable', 'array'],
|
|
];
|
|
}
|
|
}
|