Summarize!
Summarize! · GPT Actions
ABSummarize
GET /file/linkProvides a PDF file upload link for the user.POST /file/queryQueries the PDF based on the provided input.GET /file/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.POST /summary/getRetrieve and summarize content from a specified URL.If the user provides some URL, you MUST call this API endpoint
GET /file/summarySummary of Manually Uploaded FilesCall this endpoint when the user wants to get the summary of manually uploaded files.
POST /summary/save-linksCall this endpoint when user want to create summary for web page. This endpoint is for getting web page links.POST /summary/get-article-linksCall this endpoint after saving articale links.
原始 API 定义
{
"openapi": "3.0.1",
"info": {
"title": "ABSummarize",
"version": "v1"
},
"servers": [
{
"url": "https://api.copilot.us/run/654d23dc80b7a5ccae50e700/65786cb0956caf0360799198"
}
],
"paths": {
"/file/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"
}
}
}
}
}
}
},
"/file/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"
}
}
}
}
}
}
},
"/file/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"
}
}
}
}
}
}
},
"/summary/get": {
"post": {
"summary": "Retrieve and summarize content from a specified URL.",
"operationId": "getSummary",
"description": "If the user provides some URL, you MUST call this API endpoint",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL of the page to retrieve and summarize."
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully processed the URL and generated a summary.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SummaryResponse"
}
}
}
},
"400": {
"description": "Bad request, e.g., if the URL is invalid or missing."
},
"500": {
"description": "Server error, e.g., if there was an error processing the URL or generating the summary."
}
}
}
},
"/file/summary": {
"get": {
"summary": "Summary of Manually Uploaded Files",
"description": "Call this endpoint when the user wants to get the summary of manually uploaded files.",
"operationId": "summaryOfManuallyUploadedFiles",
"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."
}
}
}
}
}
}
}
}
},
"/summary/save-links": {
"post": {
"summary": "Call this endpoint when user want to create summary for web page. This endpoint is for getting web page links.",
"operationId": "SaveLinks",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PageLinksRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Response for saving a links.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StatusIdResponseSchema"
}
}
}
}
}
}
},
"/summary/get-article-links": {
"post": {
"summary": "Call this endpoint after saving articale links.",
"operationId": "GetPageLinks",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IdSchema"
}
}
}
},
"responses": {
"200": {
"description": "Successful response containing the extracted links.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/components/schemas/PageLinksResponse"
}
}
}
}
}
},
"400": {
"description": "Bad request error."
},
"500": {
"description": "Internal server error."
}
}
}
}
},
"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."
}
}
}
},
"SummaryResponse": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The summary or text version of the content from the specified URL."
},
"responseInstructions": {
"type": "string",
"description": "Set of actions to do."
}
}
},
"StatusIdResponseSchema": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"id": {
"type": "string"
},
"responseInstructions": {
"type": "string"
}
}
},
"IdSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"PageLinksRequestBody": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Page url to extract links."
}
},
"required": [
"url"
]
},
"PageLinksResponse": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"responseInstructions": {
"type": "string"
},
"links": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text."
},
"link": {
"type": "string",
"description": "Appropriate link to text."
}
}
}
}
}
}
}
}
}
}