From d81838dfc496fd79fb6d9fe2ab59cfac190af2c2 Mon Sep 17 00:00:00 2001 From: Guspan Tanadi <36249910+guspan-tanadi@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:40:41 +0700 Subject: [PATCH 1/3] docs: close parentheses EMBEDDINGS_KEY comment settings --- application/core/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/core/settings.py b/application/core/settings.py index 116735a6..25a3295d 100644 --- a/application/core/settings.py +++ b/application/core/settings.py @@ -19,7 +19,7 @@ class Settings(BaseSettings): API_URL: str = "http://localhost:7091" # backend url for celery worker API_KEY: str = None # LLM api key - EMBEDDINGS_KEY: str = None # api key for embeddings (if using openai, just copy API_KEY + EMBEDDINGS_KEY: str = None # api key for embeddings (if using openai, just copy API_KEY) OPENAI_API_BASE: str = None # azure openai api base url OPENAI_API_VERSION: str = None # azure openai api version AZURE_DEPLOYMENT_NAME: str = None # azure deployment name for answering From ce8ed5bfebbbdb69b99e6023ea90ae5b510a02c4 Mon Sep 17 00:00:00 2001 From: Guspan Tanadi <36249910+guspan-tanadi@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:45:23 +0700 Subject: [PATCH 2/3] style: formatting /api/task_status API-docs --- docs/pages/Developing/API-docs.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/pages/Developing/API-docs.md b/docs/pages/Developing/API-docs.md index b57f6b1b..fa66250c 100644 --- a/docs/pages/Developing/API-docs.md +++ b/docs/pages/Developing/API-docs.md @@ -116,6 +116,7 @@ This endpoint is used to upload a file that needs to be trained, response is JSO **Request:** **Method**: `POST` + **Request Body**: A multipart/form-data form with file upload and additional fields, including `user` and `name`. HTML example: @@ -143,7 +144,9 @@ JSON response with a status and a task ID that can be used to check the task's p This endpoint is used to get the status of a task (`task_id`) from `/api/upload` **Request:** -**Method**: `GE`T + +**Method**: `GET` + **Query Parameter**: `task_id` (task ID to check) **Sample JavaScript Fetch Request:** From 9c5e3d094b6a01bd90d876200c6ebc800da812ca Mon Sep 17 00:00:00 2001 From: Guspan Tanadi <36249910+guspan-tanadi@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:59:09 +0700 Subject: [PATCH 3/3] docs: insert Method description /api/docs_check section API-docs --- docs/pages/Developing/API-docs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/Developing/API-docs.md b/docs/pages/Developing/API-docs.md index fa66250c..5601ebc8 100644 --- a/docs/pages/Developing/API-docs.md +++ b/docs/pages/Developing/API-docs.md @@ -55,6 +55,8 @@ This endpoint will make sure documentation is loaded on the server (just run it **Request:** +**Method**: `POST` + **Headers**: Content-Type should be set to `application/json; charset=utf-8` **Request Body**: JSON object with the field: