docs: add languages to code blocks

This commit is contained in:
Jordan Tucker 2023-09-12 15:02:11 -05:00
parent e6d48d91ce
commit ee618444c9
21 changed files with 47 additions and 49 deletions

View file

@ -32,7 +32,7 @@ Go to [admin.litellm.ai](https://admin.litellm.ai/) and copy the code snippet wi
**Add it to your .env**
```
```python
import os
os.env["LITELLM_TOKEN"] = "e24c4c06-d027-4c30-9e78-18bc3a50aebb" # replace with your unique token
@ -40,13 +40,13 @@ os.env["LITELLM_TOKEN"] = "e24c4c06-d027-4c30-9e78-18bc3a50aebb" # replace with
```
**Turn on LiteLLM Client**
```
```python
import litellm
litellm.client = True
```
### 3. Make a normal `completion()` call
```
```python
import litellm
from litellm import completion
import os

View file

@ -4,7 +4,7 @@ There's 2 ways to do local debugging - `litellm.set_verbose=True` and by passing
## Set Verbose
This is good for getting print statements for everything litellm is doing.
```
```python
from litellm import completion
litellm.set_verbose=True # 👈 this is the 1-line change you need to make
@ -31,13 +31,13 @@ In that case, LiteLLM allows you to pass in a custom logging function to see / m
Your custom function
```
```python
def my_custom_logging_fn(model_call_dict):
print(f"model call details: {model_call_dict}")
```
### Complete Example
```
```python
from litellm import completion
def my_custom_logging_fn(model_call_dict):