Skip to content

Commit

Permalink
updated fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
agaraman0 committed Aug 4, 2023
1 parent f77f673 commit e54cb9a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@

</div>

If you've ever faced the need of creating diagrams for a specific use case, this project is for you.
If you've ever faced the need of creating diagrams for a specific use case, this project is for you.

<img width="408" alt="Screenshot 2023-08-04 at 11 39 54 AM" src="https://github.com/agaraman0/Diagram-Magix/assets/29687692/69b8c9cf-8b6e-45e9-8d06-e39a03efc5f1">

<img width="618" alt="Screenshot 2023-08-04 at 7 01 28 AM" src="https://github.com/agaraman0/Diagram-Magix/assets/29687692/165cef2c-1aeb-482c-9bf7-2dbfd9817b36">

<img width="1439" alt="Screenshot 2023-08-03 at 1 06 46 AM" src="https://github.com/agaraman0/Diagram-Magix/assets/29687692/5f47f315-b0c5-4848-a5af-c99455273f60">

with the collective brilliance of the OSS community and the current state of LLMs, it's now possible to generate a diagram just from a description.

## ⚡️ Usage

1. Install Docker and ensure that it's running. It's also recommended that you use at least GPT-4, or GPT-3.5-turbo.
Install Docker and ensure that it's running. It's also recommended that you use at least GPT-4, or GPT-3.5-turbo.

## 📦 Setup

Expand All @@ -46,7 +52,12 @@ docker-compose -f docker-compose.dev.yml down
```


## 🤖 How it Works
## 🤖 What Differentiates it
1. Backend has capability to generate diagrams with more then 15+ frameworks as listed below
Plantuml, Mermaid, Blockading, Bytefield, Seqdiag, Actdiag, Nwdiag, Packetdiag, Rackdiag, C4-Plantuml, D2, DBML, Ditaa, Excalidraw, Graphviz, Nomnoml, Pikchr, Structurizr, Svgbob, Vega, Vegalite, Wavedrom, Wireviz
2. How did we achieve integration with 15+ Diagram generation different frameworks here comes the [Kroki](https://github.com/yuzutech/kroki)
3. As this is dependent on two third party services for that we have fall back mechanism in case even if generation fails it tries to makes sure you are getting at least a beautiful svg
4. You will be able to download your diagram or SVG


### 📝 Prompt Design
Expand All @@ -67,3 +78,5 @@ Diagram Magix is currently hosted and accessible at www.devf.in . As we are usin

if you are looking to contribute or have found some issues raise a pull request or create an issue

### Thanks
We were thinking of manually integrating multiple frameworks as backend for generating diagrams but all Thanks to FOSS and [Kroki](https://github.com/yuzutech/kroki) for getting all frameworks under single roof.
2 changes: 1 addition & 1 deletion backend/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def format_response(api_response, key_value_delimeter, pair_delimeter):

def try_building_diagram(api_url, recipe):
try:
response = requests.request('POST', api_url, headers=DIAGRAM_API_HEADERS, data=recipe, timeout=7)
response = requests.request('POST', api_url, headers=DIAGRAM_API_HEADERS, data=recipe, timeout=2)
return response if response.status_code == 200 else None
except Exception as err:
current_app.logger.info("Exception occur {}".format(err))
Expand Down

0 comments on commit e54cb9a

Please sign in to comment.