Gsheet AI GPT: MixerBox ChatGSheet

Gsheet AI GPT: MixerBox ChatGSheet · GPT-Aktionen

MixerBox ChatGSheet

Read/Generate Google Sheets and create related charts.

  • GET /api/gpt_plugins/sheet/authorizeAuthorize the user's Google account permissions to access his/her sheet.

    This api allow you to launch request for authorizing Google account permissions. A url will be returned, please ask the user to visit the url to continue.

  • GET /api/gpt_plugins/sheet/logoutLog out the user's Google account.

    This api allow you to log out from a Google account, so that the user can log in to another one.

  • POST /api/gpt_plugins/sheet/create_sheetCreate a Google Sheet / CSV (non-auth) or create a chart using the title and fields provided by the user.

    Create a Google Sheet / CSV (non-auth) or create a chart using the title and fields provided by the user.

  • GET /api/gpt_plugins/sheet/get_sheetRead a Google Sheet to summarize or create a chart.

    Read a Google Sheet to summarize or create a chart.

Ursprüngliches API-Schema
{
  "openapi": "3.0.1",
  "info": {
    "title": "MixerBox ChatGSheet",
    "description": "Read/Generate Google Sheets and create related charts.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://chatgsheet.mixerbox.com"
    }
  ],
  "paths": {
    "/api/gpt_plugins/sheet/authorize": {
      "get": {
        "operationId": "Authorize",
        "summary": "Authorize the user's Google account permissions to access his/her sheet.",
        "description": "This api allow you to launch request for authorizing Google account permissions. A url will be returned, please ask the user to visit the url to continue.",
        "parameters": [
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the sheet. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/sheet/logout": {
      "get": {
        "operationId": "Logout",
        "summary": "Log out the user's Google account.",
        "description": "This api allow you to log out from a Google account, so that the user can log in to another one.",
        "parameters": [
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the sheet. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoutResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/sheet/create_sheet": {
      "post": {
        "operationId": "createSheet",
        "summary": "Create a Google Sheet / CSV (non-auth) or create a chart using the title and fields provided by the user.",
        "description": "Create a Google Sheet / CSV (non-auth) or create a chart using the title and fields provided by the user.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSheetRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "title": "OK",
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSheetResponse"
                }
              }
            }
          },
          "400": {
            "title": "Bad Request",
            "description": "Bad bequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResponse"
                }
              }
            }
          },
          "401": {
            "title": "Unauthorized",
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/sheet/get_sheet": {
      "get": {
        "operationId": "getSheet",
        "summary": "Read a Google Sheet to summarize or create a chart.",
        "description": "Read a Google Sheet to summarize or create a chart.",
        "parameters": [
          {
            "in": "query",
            "name": "sheetUrl",
            "schema": {
              "type": "string"
            },
            "description": "Sheet URL use for read sheet content.",
            "required": true
          },
          {
            "in": "query",
            "name": "chartType",
            "schema": {
              "type": "string",
              "enum": [
                "COLUMN",
                "BAR",
                "LINE"
              ],
              "default": "COLUMN"
            },
            "description": "The chart type is used to provide APIs to generate built-in charts.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "title": "OK",
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSheetResponse"
                }
              }
            }
          },
          "400": {
            "title": "Bad Request",
            "description": "Bad bequest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResponse"
                }
              }
            }
          },
          "401": {
            "title": "Unauthorized",
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AuthorizeResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The url to authorize Google account permissions."
          }
        }
      },
      "LogoutResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "title": "The logout message.",
            "description": "The message of logout."
          },
          "rules": {
            "type": "array",
            "title": "The array of rules which recommend gpt to follow.",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      },
      "CreateSheetRequest": {
        "type": "object",
        "properties": {
          "sheetName": {
            "type": "string",
            "description": "Sheet name used for create."
          },
          "rows": {
            "type": "array",
            "title": "The rows",
            "description": "The first row headings used in Google Sheets.",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "title": "The title",
                  "description": "Used to change the title of a spreadsheet column."
                },
                "backgroundColor": {
                  "type": "object",
                  "title": "Background color of column",
                  "description": "Used to change the background color of a spreadsheet column.",
                  "properties": {
                    "red": {
                      "type": "float",
                      "title": "The red component of the RGB",
                      "description": "The range is 0.0 - 1.0 for the red component of the RGB color in the text."
                    },
                    "green": {
                      "type": "float",
                      "title": "The green component of the RGB",
                      "description": "The range is 0.0 - 1.0 for the green component of the RGB color in the text."
                    },
                    "blue": {
                      "type": "float",
                      "title": "The blue component of the RGB",
                      "description": "The range is 0.0 - 1.0 for the blue component of the RGB color in the text."
                    }
                  }
                },
                "textFormat": {
                  "type": "object",
                  "title": "Text format of column",
                  "description": "Used to change the text format of a spreadsheet column.",
                  "properties": {
                    "foregroundColor": {
                      "type": "object",
                      "title": "The text color",
                      "description": "Used to change the text color of a spreadsheet column.",
                      "properties": {
                        "red": {
                          "type": "float",
                          "title": "The red component of the RGB",
                          "description": "The range is 0.0 - 1.0 for the red component of the RGB color in the text."
                        },
                        "green": {
                          "type": "float",
                          "title": "The green component of the RGB",
                          "description": "The range is 0.0 - 1.0 for the green component of the RGB color in the text."
                        },
                        "blue": {
                          "type": "float",
                          "title": "The blue component of the RGB",
                          "description": "The range is 0.0 - 1.0 for the blue component of the RGB color in the text."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "columns": {
            "type": "array",
            "title": "The columns",
            "description": "The columns are a two-dimensional array used for data display in Google Sheets, where each row signifies independent data",
            "items": {
              "type": "string"
            }
          },
          "chartType": {
            "title": "The chart type",
            "description": "The chart type is used to provide APIs to generate built-in charts.",
            "schema": {
              "type": "string",
              "enum": [
                "COLUMN",
                "BAR",
                "LINE"
              ],
              "default": "COLUMN"
            }
          }
        }
      },
      "CreateSheetResponse": {
        "required": [
          "createSheet"
        ],
        "type": "object",
        "properties": {
          "sheetUrl": {
            "type": "string",
            "title": "The sheet URL",
            "description": "The URL of the created Google Spreadsheet."
          },
          "rules": {
            "type": "array",
            "title": "The array of rules which recommend gpt to follow",
            "description": "The array of rules which recommend gpt to follow.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GetSheetResponse": {
        "required": [
          "getSheet"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "title": "The Google Sheet data",
            "description": "Read a Google Sheet data.",
            "items": {
              "type": "string"
            }
          },
          "rules": {
            "type": "array",
            "title": "The array of rules which recommend gpt to follow",
            "description": "The array of rules which recommend gpt to follow.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BadRequestResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "title": "Bad request message",
            "description": "The message of bad request."
          }
        }
      },
      "UnauthorizedResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "title": "Unauthorized message",
            "description": "The message of unauthorized."
          }
        }
      }
    }
  }
}