@foreach ($chat->messages as $message) {{-- to prevent showing first 'Hi, ...' message on ai vision chat --}} @if (isset($category) && $category->slug == 'ai_vision' && count($chat->messages) === 1) @continue @endif @if ($message->input != null)
@php $avatarUrl = isset(Auth::user()->avatar) ? Auth::user()->avatar : url('/assets/img/auth/default-avatar.png'); if (str_starts_with(Auth::user()->avatar, 'upload') || str_starts_with(Auth::user()->avatar, 'assets')) { $avatarUrl = '/' . Auth::user()->avatar; } @endphp @lang('You'):
{{ $message->input }}
@if ($message->pdfPath != null && $message->pdfPath != '')
{{-- blade-formatter-disable --}} {{-- blade-formatter-enable --}}
{{ $message->pdfName }}
@endif @if ($message->images != null) @foreach (explode(',', $message->images) as $image)
@endforeach @endif @endif
@lang('AI Assistant'): @if ($message->output != null)
@php $output = $message->output; $output = str_replace(['
', '
', '
', '
'], "\n", $output); @endphp
{{ $output }}
@endif
@if ($message->outputImage != null && $message->outputImage != '')
outputImage }} />
@endif @endforeach @if (count($chat->messages) == 0)
{{ __('You have no message... Please start typing.') }}
@endif