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.0.154.tar.gz
(60.0 kB
view details)
Built Distribution
File details
Details for the file braintrust-0.0.154.tar.gz
.
File metadata
- Download URL: braintrust-0.0.154.tar.gz
- Upload date:
- Size: 60.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.32.2 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.66.3 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6e137ec4e82804ed10f9a6d988cfa388b85367784d410d19ed942f615c52ec9 |
|
MD5 | 2cdb7e46d8029f88103d1b24a860e274 |
|
BLAKE2b-256 | db0e15f463ff596b238c6b8591ba2a7f0dc1d38b48c05f018c3dbc18eeafaed8 |
File details
Details for the file braintrust-0.0.154-py3-none-any.whl
.
File metadata
- Download URL: braintrust-0.0.154-py3-none-any.whl
- Upload date:
- Size: 66.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.32.2 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.66.3 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66e5a1292feb5dd3184f226915b450f4897f9d9c0da4f986c9059e4154850371 |
|
MD5 | 3c1cd21f3e8323c8eca47148ba717418 |
|
BLAKE2b-256 | 2a9553a460f02ea0179128264def069b82977667fad9f2ed2781d49dcedda73c |