Maintenance.") * ) * ), * * @OA\Response(response=401, description="Unauthenticated"), * @OA\Response(response=422, description="Validation Error") * ) */ public function ask(Request $request) { $this->authorize('use ai assistant'); $request->validate([ 'question' => 'required|string|max:500', ]); $answer = $this->assistantService->answer($request->question); return response()->json([ 'status' => 'success', 'answer' => $answer, ]); } }