diff --git a/docs/pages/Developing/API-docs.md b/docs/pages/Developing/API-docs.md index 593afb3..ff6d053 100644 --- a/docs/pages/Developing/API-docs.md +++ b/docs/pages/Developing/API-docs.md @@ -4,7 +4,7 @@ App currently has two main api endpoints: Its a POST request that sends a JSON in body with 4 values. Here is a JavaScript fetch example It will recieve an answer for a user provided question -``` +```js // answer (POST http://127.0.0.1:5000/api/answer) fetch("http://127.0.0.1:5000/api/answer", { "method": "POST", @@ -20,7 +20,7 @@ fetch("http://127.0.0.1:5000/api/answer", { In response you will get a json document like this one: -``` +```json { "answer": " Hi there! How can I help you?\n", "query": "Hi", @@ -32,7 +32,7 @@ In response you will get a json document like this one: It will make sure documentation is loaded on a server (just run it everytime user is switching between libraries (documentations) Its a POST request that sends a JSON in body with 1 value. Here is a JavaScript fetch example -``` +```js // answer (POST http://127.0.0.1:5000/api/docs_check) fetch("http://127.0.0.1:5000/api/docs_check", { "method": "POST", @@ -46,7 +46,7 @@ fetch("http://127.0.0.1:5000/api/docs_check", { ``` In response you will get a json document like this one: -``` +```json { "status": "exists" } @@ -67,7 +67,7 @@ Example of json in Docshub and local: Uploads file that needs to be trained, response is json with task id, which can be used to check on tasks progress HTML example: -``` +```html