SQL+ 🔴VISUALIZE 🔴

SQL+ 🔴VISUALIZE 🔴 · GPT Actions

GPT Companion

  • POST /api/gpt/createGraphDiagramCreate graph diagram
  • POST /api/gpt/createMindmapDiagramCreate mindmap diagram
  • POST /api/gpt/createMindmapDiagramWithImageCreate graph diagram with user image or generated image
  • POST /api/gpt/createEntityRelationshipDiagramCreate entity-relationship diagram
  • POST /api/gpt/createSequenceDiagramCreate sequence diagram
  • POST /api/gpt/createPieChartDiagramCreate pie chart diagram
  • POST /api/gpt/createTimelineDiagramCreate timeline diagram
  • POST /api/gpt/createDatabaseDiagramCreate database diagram
  • POST /api/gpt/createClassDiagramCreate class diagram
原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "GPT Companion",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://www.blocksandarrows.com",
      "description": "Development server"
    }
  ],
  "components": {
    "schemas": {},
    "parameters": {}
  },
  "paths": {
    "/api/gpt/createGraphDiagram": {
      "post": {
        "summary": "Create graph diagram",
        "operationId": "CreateGraph",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createMindmapDiagram": {
      "post": {
        "summary": "Create mindmap diagram",
        "operationId": "CreateMindmap",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createMindmapDiagramWithImage": {
      "post": {
        "summary": "Create graph diagram with user image or generated image",
        "operationId": "CreateMindmapWithImage",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  },
                  "openaiFileIdRefs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "mime_type": {
                          "type": "string"
                        },
                        "download_link": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "id",
                        "mime_type",
                        "download_link"
                      ]
                    },
                    "description": "send the generated or user image with a mindmap diagram."
                  }
                },
                "required": [
                  "diagramString",
                  "title",
                  "openaiFileIdRefs"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createEntityRelationshipDiagram": {
      "post": {
        "summary": "Create entity-relationship diagram",
        "operationId": "CreateEntity",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createSequenceDiagram": {
      "post": {
        "summary": "Create sequence diagram",
        "operationId": "CreateSequence",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createPieChartDiagram": {
      "post": {
        "summary": "Create pie chart diagram",
        "operationId": "CreatePieChart",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createTimelineDiagram": {
      "post": {
        "summary": "Create timeline diagram",
        "operationId": "CreateTimeline",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          },
          "504": {
            "description": "timeout",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createDatabaseDiagram": {
      "post": {
        "summary": "Create database diagram",
        "operationId": "CreateDatabaseDiagram",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/createClassDiagram": {
      "post": {
        "summary": "Create class diagram",
        "operationId": "CreateClass",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "diagramString": {
                    "type": "string",
                    "description": "The string for the chart rendering"
                  },
                  "title": {
                    "type": "string",
                    "description": "The name of the document in which the diagram will be placed"
                  }
                },
                "required": [
                  "diagramString",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagram successfully rendered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "Answer with image and url to edit. You should not change the response text, only insert data such as descriptions"
                    }
                  },
                  "required": [
                    "answer"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Error while rendering the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    },
                    "diagramTypeGuides": {
                      "type": "string",
                      "description": "look at these guides related to the current chart type, and try to fix the error"
                    }
                  },
                  "required": [
                    "errorMessage",
                    "diagramTypeGuides"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}