{{-- Chat history --}} @if(count($messages) > 0 || $loading)
@foreach($messages as $message)
$message['role'] === 'user', 'bg-gray-50 dark:bg-gray-800 mr-8 prose dark:prose-invert max-w-none' => $message['role'] === 'assistant', ])>
{{ $message['role'] === 'user' ? 'Vous' : 'AI' }}
@if($message['role'] === 'assistant') {!! \Illuminate\Support\Str::markdown($message['content']) !!} @else {{ $message['content'] }} @endif
@endforeach {{-- Streaming response --}} @if($loading)
AI
{!! \Illuminate\Support\Str::markdown($streamedText) !!}
@endif
@endif {{-- Input --}}
Envoyer @if(count($messages) > 0) Effacer @endif