Spaces:
Running
Running
Download app/Http/Requests/Ai/GenerationRequest.php from Ailixir-AI-Team/ailixir-api: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/main/app/Http/Requests/Ai/GenerationRequest.php
- Command line
-
hf download hf://spaces/Ailixir-AI-Team/ailixir-api/app/Http/Requests/Ai/GenerationRequest.php
-
curl -L -o GenerationRequest.php https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/main/app/Http/Requests/Ai/GenerationRequest.php
840 Bytes
| namespace App\Http\Requests\Ai; | |
| use Illuminate\Foundation\Http\FormRequest; | |
| class GenerationRequest extends FormRequest | |
| { | |
| public function authorize(): bool | |
| { | |
| return true; | |
| } | |
| public function rules(): array | |
| { | |
| return [ | |
| 'num_molecules' => 'required|integer|min:1', | |
| 'return_top_k' => 'required|integer|min:1|lte:num_molecules', | |
| 'docking_mode' => 'required|string|in:top_k,off,all', | |
| 'dock_top_k' => 'exclude_unless:docking_mode,top_k|required|integer|min:0|lte:return_top_k', | |
| ]; | |
| } | |
| public function messages(): array | |
| { | |
| return [ | |
| 'dock_top_k.required' => 'Dock top K is required when docking mode is top_k', | |
| 'dock_top_k.lte' => 'Dock top K must be less than or equal to return top K', | |
| ]; | |
| } | |
| } | |