From 50fd3a1049cfc2ef901fdec9bab5996318fd7afd Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Mon, 27 May 2024 11:12:26 +0530 Subject: [PATCH] adds sequence diagram --- chatbot-ollama-springai/ReadMe.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/chatbot-ollama-springai/ReadMe.md b/chatbot-ollama-springai/ReadMe.md index c351fb0..0c2ae46 100644 --- a/chatbot-ollama-springai/ReadMe.md +++ b/chatbot-ollama-springai/ReadMe.md @@ -3,6 +3,8 @@ ## Sequence Diagram +Before Vector Store + ```mermaid sequenceDiagram participant User @@ -18,5 +20,27 @@ participant ChatMemory ChatbotService->>ChatMemory: saveInteraction(message, response) ChatbotService-->>ChatbotController: response ChatbotController-->>User: response +``` + +After Vector Store + +```mermaid +sequenceDiagram + participant User + participant ChatbotController + participant ChatbotService + participant ChatService + participant ChatMemory + participant VectorStore + User->>ChatbotController: POST /api/ai/chat + ChatbotController->>ChatbotService: chat(message) + ChatbotService->>ChatService: Process Chat Request + ChatService->>ChatMemory: Retrieve Memory + ChatService->>VectorStore: Retrieve Vectors + ChatMemory-->>ChatService: Return Memory Data + VectorStore-->>ChatService: Return Vector Data + ChatService-->>ChatbotService: Processed Response + ChatbotService-->>ChatbotController: response + ChatbotController-->>User: response ``` \ No newline at end of file