forked from phoenix/litellm-mirror
Update README.md
This commit is contained in:
parent
2c0ca12b12
commit
beb556c15c
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue