mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(docs) add langsmith callback docs
This commit is contained in:
parent
e35562d188
commit
556d3af09e
4 changed files with 55 additions and 5 deletions
51
docs/my-website/docs/observability/langsmith_integration.md
Normal file
51
docs/my-website/docs/observability/langsmith_integration.md
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
import Image from '@theme/IdealImage';
|
||||||
|
|
||||||
|
# Langsmith - Logging LLM Input/Output
|
||||||
|
An all-in-one developer platform for every step of the application lifecycle
|
||||||
|
https://smith.langchain.com/
|
||||||
|
|
||||||
|
<Image img={require('../../img/langsmith.png')} />
|
||||||
|
|
||||||
|
:::info
|
||||||
|
We want to learn how we can make the callbacks better! Meet the LiteLLM [founders](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version) or
|
||||||
|
join our [discord](https://discord.gg/wuPM9dRgDw)
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Pre-Requisites
|
||||||
|
```shell
|
||||||
|
pip install litellm
|
||||||
|
```
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
Use just 2 lines of code, to instantly log your responses **across all providers** with Langsmith
|
||||||
|
|
||||||
|
|
||||||
|
```python
|
||||||
|
litellm.success_callback = ["langsmith"]
|
||||||
|
```
|
||||||
|
```python
|
||||||
|
import litellm
|
||||||
|
import os
|
||||||
|
|
||||||
|
os.environ["LANGSMITH_API_KEY"] = ""
|
||||||
|
# LLM API Keys
|
||||||
|
os.environ['OPENAI_API_KEY']=""
|
||||||
|
|
||||||
|
# set langsmith as a callback, litellm will send the data to langsmith
|
||||||
|
litellm.success_callback = ["langsmith"]
|
||||||
|
|
||||||
|
# openai call
|
||||||
|
response = litellm.completion(
|
||||||
|
model="gpt-3.5-turbo",
|
||||||
|
messages=[
|
||||||
|
{"role": "user", "content": "Hi 👋 - i'm openai"}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Support & Talk to Founders
|
||||||
|
|
||||||
|
- [Schedule Demo 👋](https://calendly.com/d/4mp-gd3-k5k/berriai-1-1-onboarding-litellm-hosted-version)
|
||||||
|
- [Community Discord 💭](https://discord.gg/wuPM9dRgDw)
|
||||||
|
- Our numbers 📞 +1 (770) 8783-106 / +1 (412) 618-6238
|
||||||
|
- Our emails ✉️ ishaan@berri.ai / krrish@berri.ai
|
|
@ -17,15 +17,13 @@ pip install wandb litellm
|
||||||
```
|
```
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
Use just 2 lines of code, to instantly log your responses **across all providers** with Langfuse
|
Use just 2 lines of code, to instantly log your responses **across all providers** with Weights & Biases
|
||||||
|
|
||||||
|
|
||||||
Get your Langfuse API Keys from https://cloud.langfuse.com/
|
|
||||||
```python
|
```python
|
||||||
litellm.success_callback = ["wandb"]
|
litellm.success_callback = ["wandb"]
|
||||||
```
|
```
|
||||||
```python
|
```python
|
||||||
# pip install langfuse
|
# pip install wandb
|
||||||
import litellm
|
import litellm
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -33,7 +31,7 @@ os.environ["WANDB_API_KEY"] = ""
|
||||||
# LLM API Keys
|
# LLM API Keys
|
||||||
os.environ['OPENAI_API_KEY']=""
|
os.environ['OPENAI_API_KEY']=""
|
||||||
|
|
||||||
# set langfuse as a callback, litellm will send the data to langfuse
|
# set wandb as a callback, litellm will send the data to Weights & Biases
|
||||||
litellm.success_callback = ["wandb"]
|
litellm.success_callback = ["wandb"]
|
||||||
|
|
||||||
# openai call
|
# openai call
|
||||||
|
|
BIN
docs/my-website/img/langsmith.png
Normal file
BIN
docs/my-website/img/langsmith.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 311 KiB |
|
@ -118,6 +118,7 @@ const sidebars = {
|
||||||
"observability/promptlayer_integration",
|
"observability/promptlayer_integration",
|
||||||
"observability/wandb_integration",
|
"observability/wandb_integration",
|
||||||
"observability/langfuse_integration",
|
"observability/langfuse_integration",
|
||||||
|
"observability/langsmith_integration",
|
||||||
"observability/traceloop_integration",
|
"observability/traceloop_integration",
|
||||||
"observability/llmonitor_integration",
|
"observability/llmonitor_integration",
|
||||||
"observability/helicone_integration",
|
"observability/helicone_integration",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue