Download app/Http/Requests/Chatbot/ChatbotTrainingRequest.php from pnacorp/magicai: direct link, hf CLI and curl.
- Browser
- Download file 554 Bytes
-
https://huggingface.co/pnacorp/magicai/resolve/main/app/Http/Requests/Chatbot/ChatbotTrainingRequest.php
- Command line
-
hf download hf://pnacorp/magicai/app/Http/Requests/Chatbot/ChatbotTrainingRequest.php
-
curl -L -o ChatbotTrainingRequest.php https://huggingface.co/pnacorp/magicai/resolve/main/app/Http/Requests/Chatbot/ChatbotTrainingRequest.php
554 Bytes
| namespace App\Http\Requests\Chatbot; | |
| use Illuminate\Foundation\Http\FormRequest; | |
| class ChatbotTrainingRequest extends FormRequest | |
| { | |
| public function rules(): array | |
| { | |
| $array = [ | |
| 'type' => 'required|string', | |
| ]; | |
| if ($this->input('type') == 'url' || $this->input('type') == 'pdf') { | |
| $array['chatbot_data'] = 'required|array'; | |
| $array['chatbot_data.*'] = 'sometimes|nullable|integer'; | |
| } | |
| return $array; | |
| } | |
| protected function prepareForValidation(): void {} | |
| } | |