mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
feat(utils.py): json logs for raw request sent by litellm
make it easier to view verbose logs in datadog
This commit is contained in:
parent
f0e48cdd53
commit
b46db8b891
5 changed files with 18 additions and 7 deletions
|
@ -23,6 +23,14 @@ response = completion(model="gpt-3.5-turbo", messages=messages)
|
|||
response = completion("command-nightly", messages)
|
||||
```
|
||||
|
||||
## JSON Logs
|
||||
|
||||
If you need to store the logs as JSON, just set the `litellm.json_logs = True`.
|
||||
|
||||
We currently just log the raw POST request from litellm as a JSON - [**See Code**].
|
||||
|
||||
[Share feedback here](https://github.com/BerriAI/litellm/issues)
|
||||
|
||||
## Logger Function
|
||||
But sometimes all you care about is seeing exactly what's getting sent to your api call and what's being returned - e.g. if the api call is failing, why is that happening? what are the exact params being set?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue