MetaGPT
MetaGPT copied to clipboard
removes npm dependency by using mermaid ink service | removes referen…
Remove the dependency on npm
This issue is document as issue 167
Changes
- removes the dependency on npm by using the mermaid ink service
- removes references to the npm version mermaid and the related issues that is causes
Description of changes
This changes the way that mermaid.py works. Instead of doing checks to see if the npm command exists for mermaid, it makes a call to the mermaid ink service. This service takes a base64 encoded string as the mermaid code and can return either an svg or png depending on the path.
Testing
A simple test to see if this new approach works is to run the mermaid.py file and see if the mermaid charts are created in the tmp folder in the project root.
Warning
This does remove the pdf file output type.
I don't see this as an issue but someone else might.
This is a very good submission that can lower the threshold for users to use
But when faced with third-party network requirements, I have several questions
- This requires a default network dependency, but this assumption may not be true in the future, such as using Llama's intranet deployment, which means it is more reasonable to make it an option?
- What is the payment policy for third-party services? Is it free forever? Does it promises service stability?
- If the third-party service is down, what is our strategy?
had better submit as a optional solution, not directly replace the original one. feel free to have a look mine solution https://github.com/geekan/MetaGPT/pull/289
Good idea! It may be helpful when the mermaid install fails. Can you resolve the conflicts? And provide test codes for this, please. In addition, it will be convenient if it is configurable for installation and usage