Add AI usage logs for Gemini and Whisper
- Migration + AiUsageLog model with tokens, duration, time, cost fields - GeminiIntentService and GeminiVisionService log every API call with input/output token counts from usageMetadata and response time - TelegramBotService logs Whisper calls with audio duration (from Telegram) and calculates cost at $1/second - Whisper voice duration now passed from TelegramWebhookController - Free text in Telegram now tries Gemini intent detection before showing menu - /chat/ia-logs: Livewire component with summary cards + filterable table - Whisper connection test button in config panel - "Logs IA" link added to Chat/Bot nav section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ff109a5608
commit
44297aa0bb
Executable → Regular
+1
@@ -99,6 +99,7 @@ Route::middleware(["auth", "solo_usuario_administrador"])->group(function () {
|
||||
Route::get('/conversaciones', [ChatController::class, 'conversaciones'])->name('conversaciones');
|
||||
Route::get('/menus', [ChatController::class, 'menus'])->name('menus');
|
||||
Route::get('/configuracion', [ChatController::class, 'configuracion'])->name('configuracion');
|
||||
Route::get('/ia-logs', [ChatController::class, 'iaLogs'])->name('ia-logs');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user