@foreach ($chat->messages as $message)
{{-- to prevent showing first 'Hi, ...' message on ai vision chat --}}
@if (isset($category) && ($category->slug == 'ai_vision' || $category->slug === 'ai_realtime_voice_chat') && 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 --}}
@if ($message->output != null)
@lang('AI Assistant'):
@php
$output = $message->output;
$output = str_replace(['
', '
', '
', '
'], "\n", $output);
@endphp
{{ $output }}
@endif
@if ($message->outputImage != null && $message->outputImage != '')
{{ __('You have no message... Please start typing.') }}
@endif