@php $isError = isset($meta['error']); $provider = $meta['provider'] ?? null; $tokensIn = $meta['tokens_in'] ?? null; $tokensOut = $meta['tokens_out'] ?? null; $latency = $meta['latency_ms'] ?? null; @endphp
@if ($isError)
{{ $reply }}
@else
{{ $reply }}
@endif @if (! $isError && ($provider || $tokensIn !== null))
@if ($provider) Provider: {{ strtoupper($provider) }} @endif @if ($tokensIn !== null || $tokensOut !== null) Tokens: {{ ($tokensIn ?? 0) + ($tokensOut ?? 0) }} ({{ $tokensIn ?? 0 }} in / {{ $tokensOut ?? 0 }} out) @endif @if ($latency !== null) Latency: {{ $latency }} ms @endif
@endif