Files
NextChat-Awesome-Plugins/plugins/chatpdf/openapi.json
2024-09-09 18:51:03 +08:00

133 lines
3.6 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"description": "A GPT that allows the user to read data from a link.",
"title": "Chat PDF GPT",
"version": "v1"
},
"servers": [
{
"url": "https://gpt.chatpdf.aidocmaker.com"
}
],
"paths": {
"/read_url": {
"post": {
"description": "Allows for reading the contents of an URL link, including PDF/DOC/DOCX/PPT/CSV/XLS/XLSX/HTML content, Google Drive, Dropbox, OneDrive, aidocmaker.com docs. Always wrap image URLs from the response field `z1_image_urls` in Markdown, where each image has a ## DESCRIPTION.",
"operationId": "ChatPDFReadRrl",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReadDocV2Request"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Read the contents of an URL link",
"x-openai-isConsequential": false
}
}
},
"components": {
"schemas": {
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
},
"ReadDocV2Request": {
"properties": {
"f1_http_url": {
"description": "User will pass a HTTPS or HTTP url to a file so that the file contents can be read.",
"title": "F1 Http Url",
"type": "string"
},
"f2_query": {
"default": "",
"description": "User will pass a query string to fetch relevant sections from the contents. It will be used for sentence-level similarity search on the document based on embeddings.",
"title": "F2 Query",
"type": "string"
},
"f3_selected_pages": {
"default": [],
"description": "Filter document on these page numbers. Use empty list to get all pages.",
"items": {
"type": "integer"
},
"title": "F3 Selected Pages",
"type": "array"
}
},
"required": [
"f1_http_url"
],
"title": "ReadDocV2Request",
"type": "object"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Location",
"type": "array"
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
},
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError",
"type": "object"
}
}
}
}