bra1nDump / show-me-chatgpt-plugin

Create and edit diagrams in ChatGPT
https://showme.redstarplugin.com
675 stars 70 forks source link

Retrieve and store the svg from Kroki to image load latency on the user end #1

Closed bra1nDump closed 1 year ago

bra1nDump commented 1 year ago

Currently we simply create a url using mermaid code to Kroki.io service and return to ChatGPT. Kroki only creates the svg from the mermaid code on demand as the chat tries to display it inline. Thus a 1-2 second delay after the link is inserted in the chat. To fix this we need to kick of fetch of the svg from Kroki before returning the response, and return a shortened link that will return the already fetched svg by the time chat tries to render the link.