Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| RegenerateAIRequestLogRequest | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| rules | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Requests\v2\AIRequestLog; |
| 4 | |
| 5 | use App\Http\Requests\v2\Parameter\Concerns\AuthorizesVengresoAdmin; |
| 6 | use Illuminate\Foundation\Http\FormRequest; |
| 7 | |
| 8 | /** |
| 9 | * Request for re-executing an AI request log with modified parameters. |
| 10 | * |
| 11 | * @property string $prompt_input The modified prompt text to send to the AI |
| 12 | * @property string|null $provider AI provider to use (vertex, gpt, claude, grok) |
| 13 | * @property string|null $model Model identifier to use (e.g. gemini-3.1-flash-lite-preview) |
| 14 | * @property float|null $temperature Sampling temperature (0.0 to 2.0) |
| 15 | * @property int|null $max_tokens Maximum number of output tokens |
| 16 | * @property float|null $top_p Top-p (nucleus) sampling parameter (0.0 to 1.0) |
| 17 | */ |
| 18 | class RegenerateAIRequestLogRequest extends FormRequest |
| 19 | { |
| 20 | use AuthorizesVengresoAdmin; |
| 21 | |
| 22 | /** |
| 23 | * Get the validation rules that apply to the request. |
| 24 | * |
| 25 | * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
| 26 | */ |
| 27 | public function rules(): array |
| 28 | { |
| 29 | return [ |
| 30 | 'prompt_input' => 'required|string', |
| 31 | 'provider' => 'sometimes|string|max:50', |
| 32 | 'model' => 'sometimes|string|max:255', |
| 33 | 'temperature' => 'sometimes|numeric|min:0|max:2', |
| 34 | 'max_tokens' => 'sometimes|integer|min:1|max:65536', |
| 35 | 'top_p' => 'sometimes|numeric|min:0|max:1', |
| 36 | ]; |
| 37 | } |
| 38 | } |