Skip to content

Commit

Permalink
added mermaid for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
robcube authored Dec 4, 2024
1 parent d4dfaaf commit cc86c7f
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,33 @@ $ kubectl rollout restart deployment/what-run-app
Go to another terminal window:
```
$ curl -X POST http://127.0.0.1:8080/ask_context -H "Content-Type: application/json" -d '{"sentence": "I am running for president of the United States"}'
```
```

Diagram of the logic
```mermaid
graph TD;
A[Client] -->|POST /ask_context| B[Flask App];
B --> C{Check 'run' in sentence?};
C -->|Yes| D[get_context];
C -->|No| E[JSON comes back];
D --> F[query_dictionary];
F --> G[generate_url];
G --> H[Return JSON with context, entries, URL];
subgraph Flask Application
B
D
F
G
H
end
subgraph OpenAI API
D --> I[OpenAI Completion];
F --> J[OpenAI Embedding];
end
subgraph Dictionary
F --> K[Compute Similarity];
end
```

0 comments on commit cc86c7f

Please sign in to comment.