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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file braintrust-0.0.118.tar.gz.
File metadata
- Download URL: braintrust-0.0.118.tar.gz
- Upload date:
- Size: 50.2 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 |
84c86f59743c94627c5e2893d07b27d3d3b5aad151245ab97cad19599ccf5a7f
|
|
| MD5 |
1794ce4168b12e6d30e241a7259cebbb
|
|
| BLAKE2b-256 |
0e6f2a4cd637257fec39a9dc5c11a83e28e50497a4e47145e344eeb75a2ea691
|
File details
Details for the file braintrust-0.0.118-py3-none-any.whl.
File metadata
- Download URL: braintrust-0.0.118-py3-none-any.whl
- Upload date:
- Size: 55.1 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 |
5f07cb39065cee8471cc7b648dd50048694eb231e81692f09eb1bcf1d67d36a5
|
|
| MD5 |
c545a98d8f8f4792243f96bb8865e04b
|
|
| BLAKE2b-256 |
3d51af97cc0173d96edfe210d055b7c8a038ec76028596e24a8a8fea39f65a27
|