feat: LLM logs types, API client, and i18n labels

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
master
oabrivard 3 months ago
parent dafec2591b
commit cbe1cd6507

@ -0,0 +1,7 @@
import { api } from './client';
import type { LlmCallLogEntry } from '~/types';
export const llmLogsApi = {
getByJobId: (jobId: string): Promise<LlmCallLogEntry[]> =>
api.get<LlmCallLogEntry[]>(`/llm-logs/${jobId}`),
};

@ -351,6 +351,19 @@ const fr = {
'articleHistory.provenanceEmpty': 'Aucune donnee de provenance disponible pour cette synthese.',
'articleHistory.provenanceDescription': 'Articles candidats traites lors de la generation de cette synthese.',
// LLM Logs
'llmLogs.title': 'Logs des appels IA',
'llmLogs.callType': 'Type',
'llmLogs.model': 'Modele',
'llmLogs.duration': 'Duree',
'llmLogs.systemPrompt': 'Prompt systeme',
'llmLogs.userPrompt': 'Prompt utilisateur',
'llmLogs.response': 'Reponse',
'llmLogs.empty': 'Aucun log disponible pour cette synthese.',
'llmLogs.viewLogs': 'Voir les logs IA',
'llmLogs.seconds': 's',
'llmLogs.back': 'Retour',
// Common
'common.loading': 'Chargement...',
'common.error': 'Une erreur est survenue.',

@ -282,3 +282,16 @@ export interface ArticleHistoryResponse {
items: ArticleHistoryEntry[];
total: number;
}
// ---- LLM Call Logs ----
export interface LlmCallLogEntry {
id: string;
call_type: string;
model: string;
system_prompt: string;
user_prompt: string;
response_body: string;
duration_ms: number;
created_at: string;
}

Loading…
Cancel
Save