Skip to content

Commit

Permalink
issue #18: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
k-allagbe committed Dec 16, 2023
1 parent a5c0d47 commit 8e8a8b5
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 8e8a8b5

Please sign in to comment.