An open API service indexing awesome lists of open source software.

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.

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

![](./images/screenshot.png)

## 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
```