@extends('layout.app') @section('content')

Chatbot @if($enabled) Live · {{ $model }} @else Coming-soon mode @endif

@unless($enabled) The widget is on the website but answers with a "coming soon" message. To go live: install the SDK (composer require anthropic-ai/sdk guzzlehttp/guzzle), set ANTHROPIC_API_KEY and CHATBOT_ENABLED=true. @endunless Daily limits: {{ config('bedspace.chatbot.max_messages_per_visitor_per_day') }} messages per visitor, {{ config('bedspace.chatbot.max_messages_per_day') }} for the whole site.

@forelse($byModel as $row) @empty @endforelse
ModelMessagesAnsweredVisitors Input tokensCachedOutput tokens Avg reply timeEst. cost (USD)
{{ $row->model ?? 'Not sent to the model' }} {{ number_format($row->messages) }} {{ number_format($row->answered) }} {{ number_format($row->visitors) }} {{ number_format($row->input_tokens) }} {{ number_format($row->cache_read_tokens) }} {{ number_format($row->output_tokens) }} {{ number_format($row->avg_ms / 1000, 1) }} s {{ $row->cost_usd !== null ? number_format($row->cost_usd, 2) : '–' }}
No chatbot messages in this month.

Cost is an estimate from the prices in config/bedspace.php; the Claude Console shows the exact bill.

Recent conversations

@foreach($recent as $log) @endforeach
WhenQuestionAnswerToolsOutcome
{{ $log->created_at?->timezone(config('bedspace.timezone'))->format('m-d H:i') }} {{ \Illuminate\Support\Str::limit($log->question, 200) }} {{ \Illuminate\Support\Str::limit($log->answer, 300) }} {{ $log->tools_used }} {{ $log->outcome }}
@stop