forked from phoenix/litellm-mirror
docs
This commit is contained in:
parent
e5cd21d64b
commit
e46dab5e92
1 changed files with 20 additions and 8 deletions
|
@ -1,14 +1,15 @@
|
||||||
# Setting API Keys, Base, Version
|
# Setting API Keys, Base, Version
|
||||||
|
|
||||||
|
LiteLLM allows you to specify the following:
|
||||||
|
* API Key
|
||||||
|
* API Base
|
||||||
|
* API Version
|
||||||
|
* API Type
|
||||||
|
|
||||||
environment variables
|
You can set the API configs using:
|
||||||
|
* Environment Variables
|
||||||
setting litellm.api_key
|
* litellm.api_key [litellm variables]
|
||||||
|
* Passing args to `completion()`
|
||||||
setting litellm.<provider_name>_api_key (e.g. litellm.openai_api_key, litellm.anthropic_api_key, etc.)
|
|
||||||
|
|
||||||
passing in dynamically via completion() call - e.g. completion(..., api_key="...")
|
|
||||||
|
|
||||||
|
|
||||||
# Setting API Keys, Base, and Version
|
# Setting API Keys, Base, and Version
|
||||||
|
|
||||||
|
@ -16,6 +17,8 @@ API keys, base API endpoint, and API version can be set via environment variable
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
|
### Setting API Keys
|
||||||
|
|
||||||
Set the liteLLM API key or specific provider key:
|
Set the liteLLM API key or specific provider key:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
@ -28,6 +31,15 @@ os.environ["REPLICATE_API_KEY"] = "Your API Key"
|
||||||
os.environ["TOGETHERAI_API_KEY"] = "Your API Key"
|
os.environ["TOGETHERAI_API_KEY"] = "Your API Key"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Setting API Base and API Version
|
||||||
|
|
||||||
|
```python
|
||||||
|
AZURE_API_BASE = "https://openai-gpt-4-test-v-1.openai.azure.com/"
|
||||||
|
AZURE_API_VERSION = "2023-05-15"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Setting API Version
|
||||||
|
|
||||||
## Dynamic API Key
|
## Dynamic API Key
|
||||||
|
|
||||||
You can pass the API key within `completion()` call:
|
You can pass the API key within `completion()` call:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue