MixerBox ChatDrive · GPT アクション
MixerBox ChatDrive
This plugin enables users to efficiently get information from Google drive.
GET /api/gpt_plugins/drive/authorizeAuthorize the user's Google account permissions to access his/her drive.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/drive/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.
GET /api/gpt_plugins/drive/listList files from the Google drive of userThis api allow you to fetch list of files from the Google drive of user
GET /api/gpt_plugins/drive/createFileCreate file or folder to the Google drive of userThis api allow you to create file or folder to the Google drive of user
GET /api/gpt_plugins/drive/copyFileCopy file of the Google drive of user.This api allow you to copy file of the Google drive of user.
GET /api/gpt_plugins/drive/updateFileUpdate the name or parent folder of a file of the Google drive of userThis api allow you to rename a file or move a file to another folder of the Google drive of user
POST /api/gpt_plugins/drive/batchExecutionBatch execute several operations within one api call.This api enable you to execute more than one file operation with better performance, which is useful when the job requires numbers of operations to be done.
元の API スキーマ
{
"openapi": "3.1.0",
"info": {
"title": "MixerBox ChatDrive",
"description": "This plugin enables users to efficiently get information from Google drive.",
"version": "v1"
},
"servers": [
{
"url": "https://chatdrive.mixerbox.com"
}
],
"paths": {
"/api/gpt_plugins/drive/authorize": {
"get": {
"operationId": "Authorize",
"summary": "Authorize the user's Google account permissions to access his/her drive.",
"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 drive. 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/drive/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 drive. 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/drive/list": {
"get": {
"operationId": "ListFiles",
"summary": "List files from the Google drive of user",
"description": "This api allow you to fetch list of files from the Google drive of user",
"parameters": [
{
"in": "query",
"name": "src",
"schema": {
"type": "string",
"default": "google",
"enum": [
"google"
]
},
"description": "The source of the drive. If the user asks for an invalid source, tell the user that this is not supported.",
"required": true
},
{
"in": "query",
"name": "pageToken",
"schema": {
"type": "string"
},
"description": "To fetch data from the next page, provide the 'nextPageToken' from the response of this API.",
"required": false
},
{
"in": "query",
"name": "q",
"schema": {
"type": "string"
},
"description": "To search files by query expressions. Each expression contains 3 parts: '[query_term] [operator] [values]'. Current supported query_term are: 'name', 'mimeType' and 'createdTime'. Current supported operator are: 'contains', '=', '!=', '>', '<', '>=', '<='. Multiple expressions can be join by 'and' & 'or' operator. Here are some examples. 1. filename is 'hello' and contains 'goodbye': \"name = 'hello' and name contains 'goodbye'\" 2. filename not contains 'hello': \"not name contains 'hello'\" 3. file type is png: \"mimeType = image/png\" 4. file is created after specific time: createdTime > '2012-06-04T12:00:00' // default time zone is UTC",
"required": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListFilesResponse"
}
}
}
}
}
}
},
"/api/gpt_plugins/drive/createFile": {
"get": {
"operationId": "CreatFile",
"summary": "Create file or folder to the Google drive of user",
"description": "This api allow you to create file or folder to the Google drive of user",
"parameters": [
{
"in": "query",
"name": "src",
"schema": {
"type": "string",
"default": "google",
"enum": [
"google"
]
},
"description": "The source of the drive. If the user asks for an invalid source, tell the user that this is not supported.",
"required": true
},
{
"in": "query",
"name": "fileName",
"schema": {
"type": "string"
},
"description": "The file name of new file.",
"required": true
},
{
"in": "query",
"name": "mimeType",
"schema": {
"type": "string",
"enum": [
"application/vnd.google-apps.folder",
"application/vnd.google-apps.document",
"application/vnd.google-apps.drawing",
"application/vnd.google-apps.form",
"application/vnd.google-apps.spreadsheet"
]
},
"description": "The mimeType of new file. Currently only support mimeType of folder and google related files.",
"required": true
},
{
"in": "query",
"name": "fileFolderId",
"schema": {
"type": "string"
},
"description": "Specify this value to create file under specific directory. One can get the `folderId` from the `drive/list` api.",
"required": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SingleFileResponse"
}
}
}
}
}
}
},
"/api/gpt_plugins/drive/copyFile": {
"get": {
"operationId": "CopyFile",
"summary": "Copy file of the Google drive of user.",
"description": "This api allow you to copy file of the Google drive of user.",
"parameters": [
{
"in": "query",
"name": "src",
"schema": {
"type": "string",
"default": "google",
"enum": [
"google"
]
},
"description": "The source of the drive. If the user asks for an invalid source, tell the user that this is not supported.",
"required": true
},
{
"in": "query",
"name": "fileId",
"schema": {
"type": "string"
},
"description": "The `fileId` you one to copy. One can get the `fileId` from the `drive/list` api.",
"required": true
},
{
"in": "query",
"name": "fileName",
"schema": {
"type": "string"
},
"description": "The new file name of the copied file. The original file name will be used if the parameter is not specified.",
"required": false
},
{
"in": "query",
"name": "folderId",
"schema": {
"type": "string"
},
"description": "The `fileId` of parent folder of the copied file. The default parent folder is the root of drive. One can get the `fileId` of folder from the `drive/list` api.",
"required": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListFilesResponse"
}
}
}
}
}
}
},
"/api/gpt_plugins/drive/updateFile": {
"get": {
"operationId": "UpdateFile",
"summary": "Update the name or parent folder of a file of the Google drive of user",
"description": "This api allow you to rename a file or move a file to another folder of the Google drive of user",
"parameters": [
{
"in": "query",
"name": "src",
"schema": {
"type": "string",
"default": "google",
"enum": [
"google"
]
},
"description": "The source of the drive. If the user asks for an invalid source, tell the user that this is not supported.",
"required": true
},
{
"in": "query",
"name": "fileId",
"schema": {
"type": "string"
},
"description": "The `fileId` of the file you want to move. One can get the `fileId` from the `drive/list` api.",
"required": true
},
{
"in": "query",
"name": "fileName",
"schema": {
"type": "string"
},
"description": "The new file name of the file you want to update.",
"required": false
},
{
"in": "query",
"name": "folderId",
"schema": {
"type": "string"
},
"description": "The `fileId` of the new folder of the file you want to move. One can get the `fileId` of folder from the `drive/list` api.",
"required": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SingleFileResponse"
}
}
}
}
}
}
},
"/api/gpt_plugins/drive/batchExecution": {
"post": {
"operationId": "BatchExecution",
"summary": "Batch execute several operations within one api call.",
"description": "This api enable you to execute more than one file operation with better performance, which is useful when the job requires numbers of operations to be done.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BatchExecuteRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BatchExecuteResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"BatchExecuteRequest": {
"type": "object",
"properties": {
"preservedOrder": {
"type": "boolean",
"description": "If this parameter is specified with 'true', the operations will be executed one by one in sequence. Otherwise the operations will be executed in parallel manner."
},
"operations": {
"type": "array",
"description": "The operations that should be executed in batch. Notice that the max batch size of operations is 10. Only first 10 operations will be executed if the batch size is greater than 10.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the operation that should be executed.",
"enum": [
"updateFile",
"copyFile"
]
},
"fileId": {
"type": "string",
"description": "The ID of the file that should be operated on."
},
"newFileName": {
"type": "string",
"description": "The new file name after move or copy."
},
"newFolderId": {
"type": "string",
"description": "The new folder you want to move or copy to."
}
},
"required": [
"name",
"fileId"
]
}
}
},
"required": [
"preservedOrder",
"operations"
]
},
"AuthorizeResponse": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The url to authorize Google account permissions."
}
}
},
"LogoutResponse": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The result of logout."
},
"rules": {
"title": "The array of rules which recommend gpt to follow.",
"type": "array",
"items": {
"type": "string"
},
"description": "The array of rules which recommend gpt to follow."
}
}
},
"ListFilesResponse": {
"type": "object",
"properties": {
"items": {
"title": "Search results.",
"type": "array",
"items": {
"$ref": "#/components/schemas/FileItem"
},
"description": "The search results from the google drive"
},
"nextPageToken": {
"title": "The 'pageToken' for the next page.",
"type": "string",
"description": "Provide this as 'nextPageToken' to fetch the next page."
},
"rules": {
"title": "The array of rules which recommend gpt to follow.",
"type": "array",
"items": {
"type": "string"
},
"description": "The array of rules which recommend gpt to follow."
}
}
},
"SingleFileResponse": {
"type": "object",
"properties": {
"item": {
"$ref": "#/components/schemas/FileItem"
},
"rules": {
"title": "The array of rules which recommend gpt to follow.",
"type": "array",
"items": {
"type": "string"
},
"description": "The array of rules which recommend gpt to follow."
}
}
},
"FileItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The identifier of the file"
},
"kind": {
"type": "string",
"description": "The resource type of the item, always fix to 'drive#file'"
},
"mimeType": {
"type": "string",
"description": "The mime type of the file"
},
"name": {
"type": "string",
"description": "The name of the file"
}
}
},
"BatchExecuteResponse": {
"type": "object",
"properties": {
"results": {
"title": "Batch Execution Results",
"type": "array",
"items": {
"$ref": "#/components/schemas/ExecutionResultItem"
},
"description": "The batch execution results of several drive operations."
},
"rules": {
"title": "The array of rules which recommend gpt to follow.",
"type": "array",
"items": {
"type": "string"
},
"description": "The array of rules which recommend gpt to follow."
}
}
},
"ExecutionResultItem": {
"type": "object",
"properties": {
"oldFileId": {
"type": "string",
"description": "The fileId of the target file being operated."
},
"newFileId": {
"type": "string",
"description": "The new fileId if the operation generate a new file after execution."
},
"status": {
"type": "string",
"description": "The status of the operation execution. Possible values are 'success', 'fail' and 'error'"
},
"error": {
"type": "string",
"description": "The reason of error if there is an error."
}
}
}
}
}
}