Skip to content

Latest commit

 

History

History
34 lines (18 loc) · 1.59 KB

README.md

File metadata and controls

34 lines (18 loc) · 1.59 KB

text2diagram

Use the magic of MermaidJS 🧜‍♀️ and GPT-3 💫 to create SVG diagrams from natural language descriptions!

This version uses a very simple prompt, and the resulting diagrams are usually not that useful; but it's fun to play around with and could help you to jumpstart any diagram that you want to make!

Installation

Clone to your computer and then run yarn install in the repo directory.

Usage

Run node text2diagram.js --help for usage information.

text2diagram will create an SVG file in your local directory.

Note that you will need to use your own OpenAI API key for GPT-3 to work.

Examples

an algorithm for deciding whether to run away to Paraguay based on political persecution

output

the human brain

output

an API served using the sls framework, with rate limiting and authentication, where each step has a label with the estimated latency

output

a chatbot system which first evaluates the user's intent, then updates the dialogue state, decides on an action based on the business logic, and then generates an utterance in the appropriate language to respond to the user

output