Update README.md

This commit is contained in:
Ishaan Jaff 2023-10-17 13:44:47 -07:00 committed by GitHub
parent 2c0ca12b12
commit beb556c15c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,21 @@ docker build -t litellm . && docker run -p 8000:8000 litellm
[**Read the Docs**](https://docs.litellm.ai/docs/)
## Logging Observability - Log LLM Input/Output ([Docs](https://docs.litellm.ai/docs/observability/callbacks))
LiteLLM exposes pre defined callbacks to send data to LLMonitor, Langfuse, Helicone, Promptlayer, Traceloop, Slack
```python
from litellm import completion
## set env variables for logging tools
os.environ["PROMPTLAYER_API_KEY"] = "your-promptlayer-key"
os.environ["LLMONITOR_APP_ID"] = "your-llmonitor-app-id"
os.environ["OPENAI_API_KEY"]
# set callbacks
litellm.success_callback = ["promptlayer", "llmonitor"] # log input/output to promptlayer, llmonitor, supabase
#openai call
response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}])
```
## Contributing
To contribute: Clone the repo locally -> Make a change -> Submit a PR with the change.