@extends('layouts.admin') @section('title', __('Chatbot logs')) @section('content')
{{ __('Stored chat requests and AI replies from :path.', ['path' => 'storage/chatbot/chats.json']) }}
@if($logs->isEmpty())| {{ __('When') }} | {{ __('Status') }} | {{ __('User message') }} | {{ __('AI response') }} | {{ __('Provider') }} | {{ __('Key') }} | {{ __('Sources') }} | {{ __('Model') }} | {{ __('Cache') }} | {{ __('Attempts') }} | {{ __('Error') }} |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $row['created_at'] ?? '—' }} | @if($isOk) {{ __('Success') }} @else {{ __('Failed') }} @endif |
{{ \Illuminate\Support\Str::limit($row['user_message'] ?? '', 80) }}{{ $row['user_message'] ?? '' }}
|
{{ \Illuminate\Support\Str::limit($row['ai_response'] ?? '', 80) }}{{ $row['ai_response'] ?? '' }}
|
{{ $row['provider_name'] ?? $row['provider_used'] ?? '—' }}
@if(!empty($row['provider_used']))
{{ $row['provider_used'] }} |
{{ $row['key_used'] ?? '—' }} |
@if(count($sourceLinks) > 0)
|
{{ $row['model_used'] ?: '—' }} |
@if(!empty($row['cache_hit'])) {{ __('Hit') }} @else {{ __('Miss') }} @endif |
@if(count($attempts) > 0)
{{ __('View attempts') }} ({{ count($attempts) }})
@foreach($attempts as $attempt)
{{ $attempt['provider_name'] ?? $attempt['provider'] ?? '—' }} /
{{ $attempt['api_key'] ?? '—' }}{{ __('Status') }}: {{ $attempt['status'] ?? '—' }} @if(!empty($attempt['http_status'])) (HTTP {{ $attempt['http_status'] }}) @endif
@if(!empty($attempt['message']))
{{ $attempt['message'] }}
@endif
|
@if(!empty($row['error'])) {{ $row['error'] }} @else — @endif |