add chatpdf plugin

This commit is contained in:
lloydzhou
2024-09-09 18:51:03 +08:00
parent 033fcf33f7
commit bfcea9a5d0
4 changed files with 160 additions and 0 deletions

View File

@@ -21,4 +21,5 @@ This project stores [Plugins](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
- [FastGPT](./plugins/fastgpt)
- [NPM Registry Search API](./plugins/npmsearch)
- [CodeInterpreter](./plugins/codeinterpreterapi) from: [leezhuuuuu/Code-Interpreter-Api](https://github.com/leezhuuuuu/Code-Interpreter-Api)
- [Chat PDF](./plugins/chatpdf) from: [PDF AI Reader Chat (4.1 ★)](https://chatgpt.com/g/g-oMM2c1bD3)

27
plugins/chatpdf/README.md Normal file
View File

@@ -0,0 +1,27 @@
# Chat PDF GPT
> A GPT that allows the user to read data from a link.
> [PDF AI Reader Chat (4.1 ★)](https://chatgpt.com/g/g-oMM2c1bD3)
## Schema
[openapi.json](./openapi.json)
## Servers
`https://gpt.chatpdf.aidocmaker.com`
## Operations
1. ChatPDFReadRrl
## Authentication
```
type: none
```
## Preview
![Preview](./preview.png)

View File

@@ -0,0 +1,132 @@
{
"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"
}
}
}
}

BIN
plugins/chatpdf/preview.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB