TRY DEMO HERE
https://add-x-1.bubbleapps.io/ask_your_pdf_aiThe plugin has these actions:
1. 🔸Add Document via URL
2. 🔸Add Document via File Upload
3. 🔸Retrieve Documents
4. 🔸Retrieve Single Document By ID
5. 🔸Delete Document By ID
6. 🔸Question File By ID (Chat)
7. 🔸Get Summary By Document ID
8. 🔸Summarise Selected Text
Let's study each of them in detail.
1. Add Document via URL
This action adds a file via the uploader for further work with it.
Parameters:
- url (required): The link to the document. It could be a link to a PDF or a post on a website
Response:
- doc_id (string): The document ID of the uploaded document
2. Add Document via File Upload
Adds a file via uploader for further work with it.
Parameters:
- file (required): The raw bytes of the file to be uploaded
Response:
- doc_id (string): The document ID of the uploaded document
3. Retrieve Documents
Returns a list of all previously uploaded files.
Parameters:
- page (integer, optional): The page to return. Defaults to 1.
- page_size (integer, optional): The number of documents to return per page. Defaults to 10.
Response:
- total_pages (Integer): The total number of pages available for querying
- documents (Array): A list of document details belonging to the user.
4. Retrieve Single Document By ID
Returns the file we specified by doc_id. Has fields like:
Name,
summary,
pages,
languages
Parameters:
- doc_id (string, required): The ID of the document for the conversation.
Response:
- "name": "Nature.pdf",
- "doc_id": "6e60e87c-6154-4dff-8e62-ff10d8ed16dd",
- "summary": "This is a document about nature",
- "language": "en",
- "pages": 10,
- "shareable": true,
- "date_time": "2023-07-21T06:18:18.891Z"
5. Delete Document By ID
Removes the selected file by doc_id from all downloaded files.
Parameters:
- doc_id (string, required): The ID of the document to be deleted.
Response:
- "message": "Document deleted successfully"
6. Question File By ID (Chat)
Ask a question about the selected document or create a chat with the document. To create a chat you need to make all previous messages by this json structure:
{
"sender": "user",
"message": "What does the document say?"
},
{
"sender": "bot",
"message": "The document consists of words in different languages expressing gratitude"
},
{
"sender": "user",
"message": "What is the word expressing gratitude in Spanish?"
}
Each message is an object that must have "sender" and "message" parameters.
Sender - can have the following values: "user" or "bot".
Message is the text of the bot's question or answer.
On this demo page we configured saving messages in the database. You can see setting in the workflow.
7. Get Summary By Document ID
Get a summary of the document. Get a summary of the selected document. You can specify the length, format, and request.
8. Summarise Selected Text
Get explanations for selected text from a document.
Parameters:
- length (String, required): How long the summary should be, with options AUTO, LONG and SHORT.
- format (String, required): The arrangement of the summary with options AUTO, PARAGRAPH, BULLET and PAPER.
- markdown (boolean, required): Flag for determining if the response should be in markdown. Default is false.
- summary_text (String, required): The text to summarise.
Response:
- summary (String): The summary of the text from the request.
- date_time (String): The time the summary was created.