Chat PDF
Chat PDF · GPT アクション
AaronChatPDF
GET /pdf/create-upload-linkProvides a PDF file upload link for the user.POST /pdf/save-pdfSaves a PDF from a provided link.POST /pdf/queryQueries the PDF based on the provided input.GET /pdf/check-statusChecks the status of the uploaded pdf file. Start calling this endpoint after the user informed that the pdf file was uploaded. If the status is "success", you can accept the user's query on the pdf file.'GET /pdf/summarySummary of Provided FilesCall this endpoint when the user wants to get the summary of provided files.
元の API スキーマ
{
"openapi": "3.0.1",
"info": {
"title": "AaronChatPDF",
"version": "v1"
},
"servers": [
{
"url": "https://api.copilot.us/run/654d23dc80b7a5ccae50e700/65786cb0956caf0360799198"
}
],
"paths": {
"/pdf/create-upload-link": {
"get": {
"summary": "Provides a PDF file upload link for the user.",
"operationId": "UploadPdf",
"responses": {
"200": {
"description": "Successful response with the upload link.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseBody"
}
}
}
}
}
}
},
"/pdf/save-pdf": {
"post": {
"summary": "Saves a PDF from a provided link.",
"operationId": "SavePdfByProvidedLink",
"requestBody": {
"description": "Body containing the links of the PDF files.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PdfUrls"
}
}
}
},
"responses": {
"200": {
"description": "Successful response indicating the PDF was saved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseBody"
}
}
}
}
}
}
},
"/pdf/query": {
"post": {
"summary": "Queries the PDF based on the provided input.",
"operationId": "QueryOnPdf",
"requestBody": {
"description": "Body containing the query for the PDF.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QueryOnPdfBody"
}
}
}
},
"responses": {
"200": {
"description": "Successful response with the query results.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseBody"
}
}
}
},
"400": {
"description": "Occurs when there's a validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseBody"
}
}
}
}
}
}
},
"/pdf/check-status": {
"get": {
"summary": "Checks the status of the uploaded pdf file. Start calling this endpoint after the user informed that the pdf file was uploaded. If the status is \"success\", you can accept the user's query on the pdf file.'",
"operationId": "CheckStatus",
"responses": {
"200": {
"description": "Returns the status of the uploaded pdf file",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StatusBody"
}
}
}
}
}
}
},
"/pdf/summary": {
"get": {
"summary": "Summary of Provided Files",
"description": "Call this endpoint when the user wants to get the summary of provided files.",
"operationId": "summaryProvidedFiles",
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"filesSummary": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fileName": {
"type": "string"
},
"content": {
"type": "string"
}
}
}
},
"responseInstructions": {
"type": "string",
"description": "Set of actions to do."
}
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"QueryOnPdfBody": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The query or question to ask based on the PDF document."
}
}
},
"ResponseBody": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"responseInstructions": {
"type": "string"
},
"errorMessage": {
"type": "string"
},
"response": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
}
},
"StatusBody": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Returns one of the values: running, success, fail."
},
"responseInstructions": {
"type": "string",
"description": "Set of actions to inform the user about."
}
}
},
"PdfUrls": {
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": {
"type": "string",
"description": "The url of the pdf file."
}
}
}
}
}
}
}