https://github.com/icholy/mermaidai
Use OpenAI advanced voice to create mermaid diagrams.
https://github.com/icholy/mermaidai
Last synced: 7 months ago
JSON representation
Use OpenAI advanced voice to create mermaid diagrams.
- Host: GitHub
- URL: https://github.com/icholy/mermaidai
- Owner: icholy
- Created: 2025-01-04T21:00:11.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-02T19:21:17.000Z (over 1 year ago)
- Last Synced: 2025-02-02T20:21:11.026Z (over 1 year ago)
- Language: JavaScript
- Size: 154 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mermaid AI
> Use OpenAI advanced voice to create [mermaid](https://mermaid.live) diagrams.
## Install
```
go install github.com/icholy/mermaidai@master
```
## Usage
Start the server, and open the UI in your browser: http://localhost:8000
```
mermaidai
```
Notes:
* If you don't have an `OPENAI_API_KEY` environment variable, you can pass it using the `--apikey` flag.
* You must click the "Update" buttons after manually editing any text.
* Don't read the FE code.
## Screenshot

## Diagram
``` mermaid
sequenceDiagram;
participant Mermaid as Mermaid Diagram;
participant Browser as Browser Client;
participant Server as Server;
participant OpenAI as OpenAI Real-time API;
Browser->>Server: Request Session;
Server->>OpenAI: Request Temporary Token;
OpenAI-->>Server: Provide Temporary Token;
Server-->>Browser: Provide Session (Token);
Browser->>OpenAI: Request with Token;
OpenAI-->>Browser: Return SDP;
Browser->>OpenAI: Establish RTC Connection;
loop RTC Communication
Browser->>OpenAI: Send Mermaid Diagram State;
Browser->>OpenAI: Send Voice Information;
OpenAI-->>Browser: Tool Call (updateMermaidDefinition);
Browser->>Mermaid: Update Diagram with Parameters;
end
```