Introduction to Diagrams Plugin

Diagrams

Create and display diagrams from kroki.io or using networkx and matplotlib.

Listing

  • No Reviews Yet

Diagrams

The Diagrams plugin is a powerful tool that can generate various types of diagrams based on user needs. Whether it's explaining complex concepts or describing intricate processes, the Diagrams plugin presents information in an intuitive way. It supports a variety of diagram types, including state diagrams, UML diagrams, graphs, and more, and can be rendered using tools like Kroki and networkx. Whether you need to explain how a computer works or describe the process of creating a REST API on AWS, the Diagrams plugin can help you present information in a graphical way.

Function

  • Generate various types of diagrams based on user needs
  • Support a variety of diagram types, including state diagrams, UML diagrams, graphs, and more
  • Render diagrams using tools like Kroki and networkx
  • Provide diagram modification and revision features
Learn about the tutorial of this plugin:
How to Use the Diagrams ChatGPT Plugin?

JSON Data

{"id":"plugin-02ed4050-db2d-4a40-9eee-fc8c27fbadc6","domain":"diagrams.herokuapp.com","namespace":"Diagrams","status":"approved","manifest":{"schema_version":"v1","name_for_model":"Diagrams","name_for_human":"Diagrams","description_for_model":"You should use this plugin when users request visualizations or ask follow-up questions about a diagram or any modifications thereof.\nExamples of user prompts to use this plugin include:\n\"Explain how a computer works using a visual diagram.\"\n\"Describe the process of create a REST API on AWS.\"\n\"How does a jet engine work?\"\n\"Show me how ... works.\"\n\"Show me a network diagram of ... .\"\n\nThis plugin is also useful when a you receive a question about how something works, requires an explanation about an idea or process, summarization, or asks for a description of a process. Any prompt that can be effectively summarized or explained in the format of a state diagram, UML diagram, graph or other types of diagrams can be visualized using this plugin. We will talk more about the types of diagrams which are supported in a bit.\n\nTo create a request to the plugin API, create the diagram based on what the user asked and pass it to the plugin API to render. Kroki supports a wide range of syntaxes including Mermaid, GraphViz, PlantUML, and many more. Neo4J uses Cypher to create network graph diagrams.\n\nWhen creating diagrams:\n\nPrefer hierarchical layouts for diagrams, and avoid linear diagrams.\nIf there are multiple options, choose the best one and let the user know about the other options available.\nHere is a list of symbols which should not be used, for what purpose and what to use instead, delimited by commas:\n\n- ampersand &, label, \"and\"\n- round brackets (), node identifiers node labels edge labels, comma ,\n- empty text \"\", edges, use a label if it is not the same as the target node\n\nEach type of diagram has a different syntax. If you do not know the syntax, do not use that type.\n\nThings to always do:\n\nUse short node identifiers, for example, P for Patient or AI for Artificial Intelligence.\nUse double-quotes for all labels, nodes and edges.\n\nThings to never do:\nReferring to a subgraph root node from within a subgraph itself is a syntax error and will fail so don't do it ever.\nThis is wrong:\n\ndigraph G {\n subgraph cluster_A {\n label=\"X\";\n T [label=\"Y\"];\n A -> A0;\n }\n\n subgraph cluster_A0 {\n label=\"Z\";\n }\n}\n\nThe correct way to do it:\ndigraph G {\n subgraph cluster_A {\n label=\"X\";\n T [label=\"Y\"];\n }\n\n A -> A0;\n\n subgraph cluster_A0 {\n label=\"Z\";\n }\n}\n\n\nExamples of invoking the plugin API:\n\nUser asks: \"Show me how to design an N-tier architecture.\"\nYour call to the api:\n\n{\n \"diagram_type\": \"graphviz\",\n \"diagram_source\": \"digraph G {\\n rankdir=TB;\\n node [shape=box];\\n subgraph cluster_0 {\\n label=\\\"Presentation Layer\\\";\\n color=blue;\\n P [label=\\\"Web Server (e.g., Apache, Nginx)\\\"];\\n }\\n subgraph cluster_1 {\\n label=\\\"Application Layer\\\";\\n color=green;\\n A [label=\\\"Application Server (e.g.,{\n}\n\nUser asks: \"Draw me a mindmap for a luxury cosmetics rollout of a new product. Use a maximum of 6 nodes.\"\nYour call to the api:\n```\n{\n \"diagram_type\": \"mermaid\",\n \"diagram_source\": \"graph TB\\n NP[\\\"New Product Rollout\\\"]\\n NP --> R[\\\"Research\\\"]\\n NP --> PD[\\\"Product Development\\\"]\\n NP --> M[\\\"Marketing\\\"]\\n NP --> D[\\\"Distribution\\\"]\\n NP --> S[\\\"Sales\\\"]\"\n}```\n\nUser asks: \"Show me how a product reviewer can interact with amazon.com using plantuml.\"\nYour call to the api:\n```\n{\n \"diagram_type\": \"plantuml\",\n \"diagram_source\": \"@startuml\\n left to right direction\\n actor \\\"Product Reviewer\\\" as pr\\n rectangle Amazon {\\n usecase \\\"Browse Products\\\" as UC1\\n usecase \\\"Purchase Product\\\" as UC2\\n usecase \\\"Write Review\\\" as UC3\\n usecase \\\"Rate Product\\\" as UC4\\n }\\n pr --> UC1\\n pr --> UC2\\n pr --> UC3\\n pr --> UC4\\n @enduml\"\n}```\n\n\nUser asks: \"Show me a network graph with the relationships between the members of the karate club.\"\nYour call to the api:\n```\n{\n \"diagram_type\": \"network\",\n \"diagram_source\": \"{\\\"directed\\\": false, \\\"multigraph\\\": false, \\\"graph\\\": {}, \\\"nodes\\\": [{\\\"id\\\": \\\"Member 1\\\"}, {\\\"id\\\": \\\"Member 2\\\"}, {\\\"id\\\": \\\"Member 3\\\"}, {\\\"id\\\": \\\"Member 4\\\"}, {\\\"id\\\": \\\"Member 5\\\"}, {\\\"id\\\": \\\"Member 6\\\"}, {\\\"id\\\": \\\"Member 7\\\"}, {\\\"id\\\": \\\"Member 8\\\"}, {\\\"id\\\": \\\"Member 9\\\"}, {\\\"id\\\": \\\"Member 10\\\"}], \\\"links\\\": [{\\\"source\\\": \\\"Member 1\\\", \\\"target\\\": \\\"Member 2\\\"}, {\\\"source\\\": \\\"Member 1\\\", \\\"target\\\": \\\"Member 3\\\"}, {\\\"source\\\": \\\"Member 1\\\", \\\"target\\\": \\\"Member 8\\\"}, {\\\"source\\\": \\\"Member 2\\\", \\\"target\\\": \\\"Member 4\\\"}, {\\\"source\\\": \\\"Member 2\\\", \\\"target\\\": \\\"Member 5\\\"}, {\\\"source\\\": \\\"Member 2\\\", \\\"target\\\": \\\"Member 9\\\"}, {\\\"source\\\": \\\"Member 3\\\", \\\"target\\\": \\\"Member 6\\\"}, {\\\"source\\\": \\\"Member 3\\\", \\\"target\\\": \\\"Member 10\\\"}, {\\\"source\\\": \\\"Member 4\\\", \\\"target\\\": \\\"Member 7\\\"}, {\\\"source\\\": \\\"Member 5\\\", \\\"target\\\": \\\"Member 8\\\"}, {\\\"source\\\": \\\"Member 6\\\", \\\"target\\\": \\\"Member 9\\\"}, {\\\"source\\\": \\\"Member 7\\\", \\\"target\\\": \\\"Member 10\\\"}]}\"\n}```\n\n\nWhen the user requests revisions to the diagram, for example, they ask to draw the crossover node in green then call the api with the same `diagram_type` parameter and the modified `diagram_source` text.\n\nInterpreting the API response:\n\nWhen you get the response, it will either include an image URL or an image. Render either of these inline using the alt text syntax.\nYou should create the response in this order: first the image, then suggestion to edit using words, then the edit link, then the textual explanation.\n\nImportant Tips:\n\nDo not repeat the same link.\nIf an errorMessage is included in the response, show it to the user, don't try to render the diagram inline, still suggest they can edit it online or try again.\nAdd textual explanation of the diagram contents in the end of the message. Keep it brief unless the user asks for more details.\nDo not use alias names in the textual explanation such as \"Food_Critic\" or \"fc\", just use the displayed name like \"Food Critic\".\nDon't show the diagram block unless the user asks for it.\n","description_for_human":"Create and display diagrams from kroki.io or using networkx and matplotlib.","auth":{"type":"none"},"api":{"type":"openapi","url":"https:\/\/diagrams.herokuapp.com\/static\/openapi.json"},"logo_url":"https:\/\/diagrams.herokuapp.com\/static\/logo.png","contact_email":"[email protected]","legal_info_url":"https:\/\/diagrams.herokuapp.com\/static\/LICENSE"},"oauth_client_id":null,"user_settings":{"is_installed":false,"is_authenticated":true},"categories":[{"id":"newly_added","title":"New"}]}

Ratings