@extends('portal.layout') @section('title', 'AI Regulation Assistant') @section('head') @endsection @section('content') @if(!$aiEnabled)
🤖

AI Assistant Not Available

The AI Regulation Assistant requires OpenAI to be enabled and configured. Please contact an administrator to set up the API key in Settings.

@else
{{-- Sidebar --}}

💬 Conversations

{{-- Context Filter --}}
{{-- History --}}
No conversations yet
{{-- Main Chat --}}
{{-- Messages --}}
{{-- Welcome screen --}}
🏛️

AI Regulation Assistant

Ask me anything about Indian land & building regulations — zoning rules, FAR/FSI limits, setbacks, height restrictions, permitted uses, and more.

FAR limits in Rajasthan Setback for 12m road Max height commercial FAR vs ground coverage
{{-- Messages --}} {{-- Typing indicator --}}
AI
{{-- Input --}}
AI responses are based on indexed regulations and may not be exhaustive. Always verify with official documents.
@endif @endsection @section('scripts') @php $messagesJson = $messages->map(fn($m) => ['id' => $m->id, 'role' => $m->role, 'content' => $m->content, 'sources' => $m->sources, 'timestamp' => $m->created_at->toIso8601String()])->values(); $conversationsJson = $recentConversations->map(fn($c) => ['id' => $c->id, 'title' => $c->title ?: 'New conversation', 'updated_at' => $c->updated_at->diffForHumans()]); @endphp @endsection