Skip to content

johnathanchiu/diagramming-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diagramming LLMs

This project is a exploration of providing LLMs a way to output visual responses.

Method

Mermaid.js is a diagramming and charting language that can be outputted by LLMs. We can extract the outputted mermaid code to render.

Some specific uses for this would by for educational purposes such as providing visual representation of concepts. An example is shown on a Twitter demo.

Project Setup

This project was bootstrapped with Create React App. Additionally, added tailwindcss for styling.

[1] Setting up LLM APIs

To run an LLM you can either use Ollama or ChatGPT APIs

Ollama

For Ollama, follow the setup steps from their repository. Ensure you have a server running which you can test by following this.

ChatGPT

For ChatGPT, follow the instructions from their site. Make sure to create an API key to use.

[2] Setup environment and API keys

Run cp .env.example .env then follow the comments for putting proper values in your .env file.

[3] Running the application

To start, run the following:

npm install
npm start

Future Ideas

Feel free to contribute to this repository through PRs.

  • Add structured outputs to generate valid mermaid.js code
  • Add UI piece to switch to a specific diagram's message on click

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published