diff --git a/frontend/src/api/llmLogs.ts b/frontend/src/api/llmLogs.ts new file mode 100644 index 0000000..34d2fe8 --- /dev/null +++ b/frontend/src/api/llmLogs.ts @@ -0,0 +1,7 @@ +import { api } from './client'; +import type { LlmCallLogEntry } from '~/types'; + +export const llmLogsApi = { + getByJobId: (jobId: string): Promise => + api.get(`/llm-logs/${jobId}`), +}; diff --git a/frontend/src/i18n/fr.ts b/frontend/src/i18n/fr.ts index e153bbb..28e9bfe 100644 --- a/frontend/src/i18n/fr.ts +++ b/frontend/src/i18n/fr.ts @@ -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.', diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 1c606cf..18abf33 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -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; +}