28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
```mermaid
|
|
sequenceDiagram
|
|
participant U as Usuario
|
|
participant O as Orquestador (Spring Boot)
|
|
participant DB as Caché (Redis/Firestore)
|
|
participant DFCX as Dialogflow CX Agent
|
|
participant LLM as Vertex AI (Gemini)
|
|
|
|
Note over O: Recepción de Notificación Externa
|
|
O->>DB: Almacena sesión de notificación (NotificationSessionDTO)
|
|
O->>DFC_X: Envía texto "NOTIFICACION" + parámetros (notification_text)
|
|
|
|
U->>O: Hace pregunta: "¿Por qué fue rechazada?"
|
|
O->>LLM: Clasifica entrada (MessageEntryFilter)
|
|
LLM-->>O: Resultado: "NOTIFICATION" (Seguimiento)
|
|
|
|
O->>LLM: Resuelve contexto (NotificationContextResolver)
|
|
Note right of LLM: Usa HISTORIAL + METADATOS + PREGUNTA
|
|
LLM-->>O: Respuesta específica (ej: "Tu INE está vencida")
|
|
|
|
O->>DB: Guarda respuesta temporal con UUID
|
|
O->>DFC_X: Dispara evento 'LLM_RESPONSE_PROCESSED'
|
|
|
|
Note over DFCX: Orquestador Cognitivo (Playbook)
|
|
DFCX->>O: Webhook call: /api/v1/llm/tune-response (envía UUID)
|
|
O-->>DFCX: Devuelve respuesta formateada
|
|
DFCX-->>U: Muestra respuesta final amigable
|
|
``` |