mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
(docs) openai set - org + api base
This commit is contained in:
parent
5f47c8d310
commit
7578716adc
1 changed files with 9 additions and 2 deletions
|
|
@ -1,12 +1,11 @@
|
|||
# OpenAI
|
||||
LiteLLM supports OpenAI Chat + Text completion and embedding calls.
|
||||
|
||||
### API Keys
|
||||
### Required API Keys
|
||||
|
||||
```python
|
||||
import os
|
||||
os.environ["OPENAI_API_KEY"] = "your-api-key"
|
||||
os.environ["OPENAI_ORGANIZATION"] = "your-org-id" # OPTIONAL
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
|
@ -23,6 +22,14 @@ response = completion(
|
|||
)
|
||||
```
|
||||
|
||||
### Optional Keys - OpenAI Organization, OpenAI API Base
|
||||
|
||||
```python
|
||||
import os
|
||||
os.environ["OPENAI_ORGANIZATION"] = "your-org-id" # OPTIONAL
|
||||
os.environ["OPENAI_API_BASE"] = "openaiai-api-base" # OPTIONAL
|
||||
```
|
||||
|
||||
### OpenAI Chat Completion Models
|
||||
|
||||
| Model Name | Function Call |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue