Update API-docs.md

done all the changes proposed in issue #508
pull/510/head
Harsh Mahajan 1 year ago committed by GitHub
parent e0ada7fc48
commit a8180bddad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -91,7 +91,7 @@ Response:
### /api/task_status ### /api/task_status
Gets task status (`task_id`) from `/api/upload`: Gets task status (`task_id`) from `/api/upload`:
```js ```js
// Task status (Get http://127.0.0.1:5000/api/task_status) // Find task status (Get http://127.0.0.1:5000/api/task_status)
fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4fe2e7454d1", { fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4fe2e7454d1", {
"method": "GET", "method": "GET",
"headers": { "headers": {
@ -104,7 +104,7 @@ fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4f
Responses: Responses:
There are two types of responses: There are two types of responses:
1. while task it still running, where "current" will show progress from 0 to 100 1. While the task is still running, the 'current' value will show progress from 0 to 100.
```json ```json
{ {
"result": { "result": {
@ -134,6 +134,9 @@ There are two types of responses:
### /api/delete_old ### /api/delete_old
Deletes old vectorstores: Deletes old vectorstores:
In this section, you may come across the term "vectorstores". If you're unfamiliar with what Vector Stores are, you can find more information in this [article](https://python.langchain.com/docs/modules/data_connection/vectorstores/) that provides a detailed explanation.
```js ```js
// Task status (GET http://127.0.0.1:5000/api/docs_check) // Task status (GET http://127.0.0.1:5000/api/docs_check)
fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4fe2e7454d1", { fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4fe2e7454d1", {
@ -144,7 +147,6 @@ fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4f
}) })
.then((res) => res.text()) .then((res) => res.text())
.then(console.log.bind(console)) .then(console.log.bind(console))
```
Response: Response:

Loading…
Cancel
Save