SDK for integrating Braintrust
Project description
Braintrust
A Python library for logging data to Braintrust. braintrust
is distributed as
a library on PyPI. It is open source and
available on GitHub.
Quickstart
Install the library with pip.
pip install braintrust
Then, run a simple experiment with the following code (replace YOUR_API_KEY
with
your Braintrust API key):
from braintrust import Eval
def is_equal(expected, output):
return expected == output
Eval(
"Say Hi Bot",
data=lambda: [
{
"input": "Foo",
"expected": "Hi Foo",
},
{
"input": "Bar",
"expected": "Hello Bar",
},
], # Replace with your eval dataset
task=lambda input: "Hi " + input, # Replace with your LLM call
scores=[is_equal],
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
braintrust-0.1.6.tar.gz
(132.8 kB
view details)
Built Distribution
braintrust-0.1.6-py3-none-any.whl
(155.7 kB
view details)
File details
Details for the file braintrust-0.1.6.tar.gz
.
File metadata
- Download URL: braintrust-0.1.6.tar.gz
- Upload date:
- Size: 132.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.13.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
98408801304e5633ea2cca7ba050dbc39ce0269f3a26b2f259b897535dd9f38d
|
|
MD5 |
7c80142c616ad6cf20e0382f79165a95
|
|
BLAKE2b-256 |
ca74b1b7fd8db334e47dcfcae810872bae4f7a1dbea19cac9e0f2876c82b7158
|
File details
Details for the file braintrust-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: braintrust-0.1.6-py3-none-any.whl
- Upload date:
- Size: 155.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.13.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b07f8aeee4c3414b863949c0058f6acb9b00132a0396b04b7cfa8d6bb005ba7d
|
|
MD5 |
5ce579e3adcc2aee51c141e97a32556f
|
|
BLAKE2b-256 |
463608a39a580623c6a8644d190d4c5003dd873bb9194074dd5f02d4549cb727
|