ChatDOC

ChatDOC · GPT 작업

ChatDOC

  • POST /documents/load-urlLoad Content From Url
  • POST /documents/retrieveRetrieve Content
  • GET /documents/summaryRetrieve Content
원본 API 스키마
{
  "openapi": "3.0.2",
  "info": {
    "title": "ChatDOC",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://chatdoc.com/chatdoc/api/gpts"
    }
  ],
  "paths": {
    "/documents/load-url": {
      "post": {
        "x-openai-isConsequential": false,
        "tags": [
          "Documents"
        ],
        "summary": "Load Content From Url",
        "operationId": "load document from url",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UrlReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/documents/retrieve": {
      "post": {
        "x-openai-isConsequential": false,
        "tags": [
          "Documents"
        ],
        "summary": "Retrieve Content",
        "operationId": "retrieve document fragment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetrieveReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/documents/summary": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Retrieve Content",
        "operationId": "load document summary",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            },
            "name": "doc_id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "RetrieveReq": {
        "title": "RetrieveReq",
        "required": [
          "question",
          "doc_id"
        ],
        "type": "object",
        "properties": {
          "question": {
            "title": "Question",
            "type": "string"
          },
          "doc_id": {
            "title": "Doc Id",
            "type": "string"
          }
        }
      },
      "UrlReq": {
        "title": "UrlReq",
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "title": "Url",
            "type": "string"
          }
        }
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      }
    }
  }
}