Skip to content

Commit

Permalink
Merge pull request #16 from tommylees112/d2
Browse files Browse the repository at this point in the history
D2
  • Loading branch information
tommylees112 authored Sep 15, 2024
2 parents 93f49b7 + 5f9f052 commit 37ea600
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ This project is a WhatsApp chatbot that uses the Cohere Command R+ model to summ
- Uses Cohere Command R+ model for summarization.
- Deployed on Google Cloud Run.


## Diagram

![System Diagram](diagram.png)

## Setup

1. Clone the repository:
Expand Down
38 changes: 38 additions & 0 deletions diagram.d2
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
direction: down

WhatsAppUser: "WhatsApp User" {
WhatsAppApp: "WhatsApp"
}

CLIUser: "CLI User" {
CLI: "curl"
}

TwilioAPI: "Twilio API"
FastAPI: "FastAPI Application" {
Endpoint1: "/"
Endpoint2: "/summarize"
Endpoint3: "/webhook"
}
Summarizer: "Summarizer Component"
WebBaseLoader: "WebBaseLoader (LangChain)"
CohereAPI: "Cohere API"
WebPage: "Web Page"

WhatsAppUser -> WhatsAppApp: "Sends message with URL"
WhatsAppApp -> TwilioAPI: "Message received"
TwilioAPI -> FastAPI: "Webhook triggered (/webhook)"

CLIUser -> FastAPI: "Sends URL to /summarize"

FastAPI -> Summarizer: "Extracts URL and processes"
Summarizer -> WebBaseLoader: "Loads content"
WebBaseLoader -> Summarizer: "Returns page content"
WebBaseLoader -> WebPage: "Fetches page content"
Summarizer -> CohereAPI: "Sends content for summarization"
CohereAPI -> Summarizer: "Returns summary"
Summarizer -> FastAPI: "Provides summary"
FastAPI -> TwilioAPI: "Sends summary"
TwilioAPI -> WhatsAppApp: "Message sent"
WhatsAppApp -> WhatsAppUser: "Delivers summary"
FastAPI -> CLIUser: "Returns summary"
Binary file added diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 37ea600

Please sign in to comment.