scenarist / diagrams /end_to_end_sequence.mmd
github-actions[bot]
Sync backend to Hugging Face Space (commit: 39b5c807918249fa80049d49f4b6a74d6a0ed1fc)
6d86412
Raw
History Blame Contribute Delete
1.8 kB
sequenceDiagram
participant Client
participant API as FastAPI Backend
participant Strategy as Strategy Services
participant Graph as Neo4j
participant Redis as Redis
participant Chroma as ChromaDB
participant Ollama as Ollama
participant DID as D-ID
participant Hume as Hume
Client->>API: GET /healthz
API-->>Client: status ok
Client->>API: POST /api/pipeline/seed
API->>Graph: ingest doctors
Graph-->>API: seeded result
API-->>Client: graph ready
Client->>API: POST /api/strategy/full-evaluate
API->>Strategy: load records and cluster
Strategy->>Ollama: feature extraction or optimization if configured
Strategy->>Chroma: retrieve campaign examples if needed
Strategy-->>API: heatmap and cluster result
API-->>Client: strategy response
Client->>API: GET /api/strategy/cluster/{cluster_id}/doctors
API-->>Client: doctors in chosen segment
Client->>API: GET /api/persona/{code_name}
API->>Graph: doctor lookup
Graph-->>API: doctor data or empty
API-->>Client: persona payload
Client->>API: POST /api/simulation/start
API->>DID: create stream if configured
API->>Redis: store session
API-->>Client: session and stream details
Client->>API: POST /api/simulation/turn
API->>Redis: read and update session
API->>Chroma: semantic cache lookup
API->>Ollama: generate reply if needed
API->>Hume: analyze prosody if audio present
API-->>Client: simulation response
Client->>API: POST /api/mohp/evaluate
API->>Ollama: generate objections if configured
API->>Redis: store objections
API-->>Client: objections
Client->>API: GET /api/analytics/session/{session_id}
API->>Redis: load session analytics
API-->>Client: full review