Currently ChatGPT plugin model is in beta, and the plugin store has very limited capabilities. This limits our reach.
Work that needs to be done and proposed architecture:
[ ] Create a new directory under /web with a Next.js typescript app
[ ] Create a landing page with example diagrams generated by users.
[ ] Add an input box to accept diagram description
[ ] Create an endpoint in Next.js to handle submitted input from the page. For example the input is "Show me a diagram of airline expenses in the US in a pie chart"
[ ] On the server side of Next.js fetch manifest from showme.redstarplugin.com/.well-known/ai-plugin.json to get the plugin manifest
[ ] Construct the prompt for gpt-4 using the manifest + user input
[ ] Ask gpt-4 to generate the mermaid diagram source
[ ] With the result hit the /render endpoint using the same domain and passing mermaid and source query parameter with the mermaid.js diagram, example request using curl
[ ] Alternatively instead of hitting the /render you can use kroki.io to render the resulting diagram, this is what we do internally in the plugin https://kroki.io/#post-requests
Currently ChatGPT plugin model is in beta, and the plugin store has very limited capabilities. This limits our reach.
Work that needs to be done and proposed architecture:
showme.redstarplugin.com/.well-known/ai-plugin.json
to get the plugin manifest/render
endpoint using the same domain and passing mermaid and source query parameter with the mermaid.js diagram, example request using curl