mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-23 04:28:07 +00:00
add missing references
This commit is contained in:
@@ -6,8 +6,8 @@ liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for
|
||||
|
||||
liteLLM supports:
|
||||
|
||||
- [Helicone](https://docs.helicone.ai/introduction)
|
||||
- [LLMonitor](https://llmonitor.com/docs)
|
||||
- [Helicone](https://docs.helicone.ai/introduction)
|
||||
- [Sentry](https://docs.sentry.io/platforms/python/)
|
||||
- [PostHog](https://posthog.com/docs/libraries/python)
|
||||
- [Slack](https://slack.dev/bolt-python/concepts)
|
||||
|
||||
+32
-22
@@ -17,36 +17,46 @@ const sidebars = {
|
||||
|
||||
// But you can create a sidebar manually
|
||||
tutorialSidebar: [
|
||||
{ type: "doc", id: "index" }, // NEW
|
||||
{ type: "doc", id: "index" }, // NEW
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Completion()',
|
||||
items: ['completion/input','completion/output'],
|
||||
type: "category",
|
||||
label: "Completion()",
|
||||
items: ["completion/input", "completion/output"],
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Embedding()',
|
||||
items: ['embedding/supported_embedding'],
|
||||
type: "category",
|
||||
label: "Embedding()",
|
||||
items: ["embedding/supported_embedding"],
|
||||
},
|
||||
'debugging/local_debugging',
|
||||
'completion/supported',
|
||||
"debugging/local_debugging",
|
||||
"completion/supported",
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorials',
|
||||
items: ['tutorials/huggingface_tutorial', 'tutorials/TogetherAI_liteLLM', 'tutorials/debugging_tutorial'],
|
||||
type: "category",
|
||||
label: "Tutorials",
|
||||
items: [
|
||||
"tutorials/huggingface_tutorial",
|
||||
"tutorials/TogetherAI_liteLLM",
|
||||
"tutorials/debugging_tutorial",
|
||||
],
|
||||
},
|
||||
'token_usage',
|
||||
'stream',
|
||||
'secret',
|
||||
'caching',
|
||||
"token_usage",
|
||||
"stream",
|
||||
"secret",
|
||||
"caching",
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Logging & Observability',
|
||||
items: ['observability/callbacks', 'observability/integrations', 'observability/helicone_integration', 'observability/supabase_integration'],
|
||||
type: "category",
|
||||
label: "Logging & Observability",
|
||||
items: [
|
||||
"observability/callbacks",
|
||||
"observability/integrations",
|
||||
"observability/llmonitor_integration",
|
||||
"observability/helicone_integration",
|
||||
"observability/supabase_integration",
|
||||
],
|
||||
},
|
||||
'troubleshoot',
|
||||
'contributing',
|
||||
'contact'
|
||||
"troubleshoot",
|
||||
"contributing",
|
||||
"contact",
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
@@ -1,29 +1,30 @@
|
||||
# Callbacks
|
||||
|
||||
## Use Callbacks to send Output Data to Posthog, Sentry etc
|
||||
liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses.
|
||||
|
||||
liteLLM supports:
|
||||
liteLLM provides `success_callbacks` and `failure_callbacks`, making it easy for you to send data to a particular provider depending on the status of your responses.
|
||||
|
||||
liteLLM supports:
|
||||
|
||||
- [LLMonitor](https://llmonitor.com/docs)
|
||||
- [Helicone](https://docs.helicone.ai/introduction)
|
||||
- [Sentry](https://docs.sentry.io/platforms/python/)
|
||||
- [Sentry](https://docs.sentry.io/platforms/python/)
|
||||
- [PostHog](https://posthog.com/docs/libraries/python)
|
||||
- [Slack](https://slack.dev/bolt-python/concepts)
|
||||
|
||||
### Quick Start
|
||||
|
||||
```python
|
||||
from litellm import completion
|
||||
|
||||
# set callbacks
|
||||
litellm.success_callback=["posthog", "helicone"]
|
||||
litellm.failure_callback=["sentry"]
|
||||
litellm.success_callback=["posthog", "helicone", "llmonitor"]
|
||||
litellm.failure_callback=["sentry", "llmonitor"]
|
||||
|
||||
## set env variables
|
||||
os.environ['SENTRY_API_URL'], os.environ['SENTRY_API_TRACE_RATE']= ""
|
||||
os.environ['POSTHOG_API_KEY'], os.environ['POSTHOG_API_URL'] = "api-key", "api-url"
|
||||
os.environ["HELICONE_API_KEY"] = ""
|
||||
os.environ["HELICONE_API_KEY"] = ""
|
||||
|
||||
response = completion(model="gpt-3.5-turbo", messages=messages)
|
||||
response = completion(model="gpt-3.5-turbo", messages=messages)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
# Logging Integrations
|
||||
|
||||
| Integration | Required OS Variables | How to Use with callbacks |
|
||||
|-----------------|--------------------------------------------|-------------------------------------------|
|
||||
| Sentry | `SENTRY_API_URL` | `litellm.success_callback=["sentry"]` |
|
||||
| Posthog | `POSTHOG_API_KEY`,`POSTHOG_API_URL` | `litellm.success_callback=["posthog"]` |
|
||||
| Slack | `SLACK_API_TOKEN`,`SLACK_API_SECRET`,`SLACK_API_CHANNEL` | `litellm.success_callback=["slack"]` |
|
||||
| Helicone | `HELICONE_API_TOKEN` | `litellm.success_callback=["helicone"]` |
|
||||
|
||||
|
||||
|
||||
|
||||
| Integration | Required OS Variables | How to Use with callbacks |
|
||||
| ----------- | -------------------------------------------------------- | ---------------------------------------- |
|
||||
| LLMonitor | `LLMONITOR_APP_ID` | `litellm.success_callback=["llmonitor"]` |
|
||||
| Sentry | `SENTRY_API_URL` | `litellm.success_callback=["sentry"]` |
|
||||
| Posthog | `POSTHOG_API_KEY`,`POSTHOG_API_URL` | `litellm.success_callback=["posthog"]` |
|
||||
| Slack | `SLACK_API_TOKEN`,`SLACK_API_SECRET`,`SLACK_API_CHANNEL` | `litellm.success_callback=["slack"]` |
|
||||
| Helicone | `HELICONE_API_TOKEN` | `litellm.success_callback=["helicone"]` |
|
||||
|
||||
Reference in New Issue
Block a user