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.115.tar.gz
(50.6 kB
view details)
Built Distribution
File details
Details for the file braintrust-0.0.115.tar.gz
.
File metadata
- Download URL: braintrust-0.0.115.tar.gz
- Upload date:
- Size: 50.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.66.1 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 | 696ee657254c39a231410614ebf386b50d7e013322bcd14e919683dd427a9a36 |
|
MD5 | 54f1db323ba99854388f572e614d9364 |
|
BLAKE2b-256 | 5155d16010b8edf0ded14a1b5798849eb841bfe1f2af67be4f7a18bc98d73641 |
File details
Details for the file braintrust-0.0.115-py3-none-any.whl
.
File metadata
- Download URL: braintrust-0.0.115-py3-none-any.whl
- Upload date:
- Size: 55.5 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.31.0 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.66.1 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 | 9af2b982cfe24c10c7f962302e0073a3685aed31ec0a0391bc7ef552a16662ab |
|
MD5 | 9f0f3dd3b1dfe4c162ba2ead00db60cb |
|
BLAKE2b-256 | d3ca9a1471885e786762925d9fc1a9aa58be4886a2a6858cde3fbad43748c768 |