Skip to content

Commit

Permalink
docs: add about optional params
Browse files Browse the repository at this point in the history
  • Loading branch information
nagarajpandith committed Dec 9, 2023
1 parent c16d26a commit d8c1040
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ python3 index.py
1. Using `curl`

```bash
curl -X POST -H "Content-Type: application/json" -d '{"content": "YOUR_PROMPT", "provider": "PROVIDER_NAME", "api_key":"API_KEY_HERE"}' http:https://127.0.0.1:5000/chat_completion
curl -X POST -H "Content-Type: application/json" -d '{"content": "YOUR_PROMPT", "api_key":"API_KEY_HERE", "provider": "PROVIDER_NAME", "stream": false}' http:https://127.0.0.1:5000/chat_completion
```

2. Using Any API testing platform like Postman, Thunder client etc.
Expand All @@ -41,8 +41,9 @@ curl -X POST -H "Content-Type: application/json" -d '{"content": "YOUR_PROMPT",
```json
{
"content": "YOUR_PROMPT",
"api_key": "API_KEY_HERE",
"provider": "PROVIDER_NAME",
"api_key": "API_KEY_HERE"
"stream": false
}
```

Expand All @@ -53,9 +54,12 @@ curl -X POST -H "Content-Type: application/json" -d '{"content": "YOUR_PROMPT",

| Endpoint | Description | Method | Example Body |
| -------------------- | -------------------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| `/chat_completion` | Generates text using LLM & Model based on Provider | POST | `{"content": "YOUR_PROMPT", "provider": "PROVIDER_NAME","api_key": "API_KEY_HERE"}` |
| `/chat_completion` | Generates text using LLM & Model based on Provider | POST | `{"content": "YOUR_PROMPT", "api_key": "API_KEY_HERE", "provider": "PROVIDER_NAME", "stream": false}` |
| `/working_providers` | Retrieves a list of Working Providers | GET | `{}` |

> [!TIP]
> The provider and stream parameters are optional. If not provided, the default provider is set to "You" and the default stream is set to true. If stream is set to false, the response will be in direct final output format.
## Providers Testing Results

> (Last Tested on 9-12-2023)
Expand Down

0 comments on commit d8c1040

Please sign in to comment.