Skip to content

Commit 0a708e5

Browse files
authored
chore: Deprecate old langchain package (#193)
1 parent 2a174d8 commit 0a708e5

2 files changed

Lines changed: 33 additions & 6 deletions

File tree

integrations/langchain-py/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
1-
# braintrust-langchain
1+
# braintrust-langchain (DEPRECATED)
22

33
[![PyPI version](https://img.shields.io/pypi/v/braintrust-langchain.svg)](https://pypi.org/project/braintrust-langchain/)
44

55
SDK for integrating [Braintrust](https://braintrust.dev) with [LangChain](https://langchain.com/). This package provides a callback handler to automatically log LangChain executions to Braintrust.
66

7+
> **This package is deprecated.** The LangChain integration is now included in the main [`braintrust`](https://pypi.org/project/braintrust/) package.
8+
9+
## Migration
10+
11+
1. Remove `braintrust-langchain` from your dependencies
12+
2. Install or upgrade `braintrust`:
13+
```bash
14+
pip install --upgrade braintrust
15+
```
16+
3. Update your imports:
17+
```python
18+
# Before
19+
from braintrust_langchain import BraintrustCallbackHandler, set_global_handler
20+
21+
# After (option 1: same explicit callback API from the main package)
22+
from braintrust.integrations.langchain import BraintrustCallbackHandler, set_global_handler
23+
24+
# After (option 2: helper that initializes Braintrust and installs the global handler)
25+
from braintrust.integrations.langchain import setup_langchain
26+
27+
setup_langchain(project_name="your-project-name")
28+
```
29+
30+
The callback API is the same - no code changes are needed beyond the package/import path.
31+
32+
---
33+
734
## Installation
835

936
```bash

integrations/langchain-py/pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[project]
22
name = "braintrust-langchain"
3-
version = "0.2.1"
4-
description = "Integration for LangChain and Braintrust Tracing"
3+
version = "0.3.0"
4+
description = "DEPRECATED: LangChain integration is now included in the main braintrust package. Install braintrust instead."
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
8-
"braintrust>=0.2.1",
8+
"braintrust>=0.12.0",
99
"langchain>=0.3.27",
1010
]
1111
license = "MIT"
1212
authors = [{ name = "Braintrust", email = "info@braintrust.dev" }]
13-
keywords = ["braintrust", "langchain", "llm", "tracing", "ai", "agents"]
13+
keywords = ["braintrust", "langchain", "llm", "tracing", "ai", "agents", "deprecated"]
1414
classifiers = [
15-
"Development Status :: 4 - Beta",
15+
"Development Status :: 7 - Inactive",
1616
"Programming Language :: Python :: 3",
1717
"Programming Language :: Python :: 3.10",
1818
"Programming Language :: Python :: 3.11",

0 commit comments

Comments
 (0)