From 8e8a8b5be0467e8c7b925dd7647ba7d885fd0bdb Mon Sep 17 00:00:00 2001 From: "K. Allagbe" Date: Fri, 15 Dec 2023 22:59:30 -0500 Subject: [PATCH] issue #18: update docs --- docs/USAGE.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/USAGE.md b/docs/USAGE.md index 7d0e0eb..1cfb78d 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -1,24 +1,36 @@ ## Running and testing the API + Create and set the environment variables based on `.env.template`. -Running: +### Running: ``` flask run -h 0.0.0.0 --debug ``` -Alternatively, set the `FINESSE_BACKEND_DEBUG_MODE` environment variable to -`True` and -run: +Alternatively, set the `FINESSE_BACKEND_DEBUG_MODE` environment variable to +`True` and run: + ``` python run.py ``` -Query from the command-line: +### Query Azure AI Search from the command-line + +``` +curl -X POST http://localhost:5000/search/azure --data '{"query": "is e.coli a virus or bacteria?"}' -H "Content-Type: application/json" +``` + +### Query Ailab Search from the command-line + +``` +curl -X POST http://localhost:5000/search/ailab --data '{"query": "is e.coli a virus or bacteria?"}' -H "Content-Type: application/json" +``` + +### Query Static Search from the command-line ``` -curl -X POST http://localhost:5000/search --data '{"query": "is e.coli a virus -or bacteria?"}' -H "Content-Type: application/json" +curl -X POST http://localhost:5000/search/static --data '{"query": "how to bring a cat to canada"}' -H "Content-Type: application/json" ``` JSON structure explanation: