braintrust
TypeScript icon, indicating that this package has built-in type declarations

0.0.99 • Public • Published

An isomorphic JS library for logging data to Braintrust.

Quickstart

Install the library with npm (or yarn).

npm install braintrust

Then, run a simple experiment with the following code (replace YOUR_API_KEY with your Braintrust API key):

import * as braintrust from "braintrust";

const experiment = await braintrust.init("NodeTest", {
  apiKey: "YOUR_API_KEY",
});
experiment.log({
  inputs: { test: 1 },
  output: "foo",
  expected: "bar",
  scores: {
    n: 0.5,
  },
  metadata: {
    id: 1,
  },
});
console.log(await experiment.summarize());

Readme

Keywords

none

Package Sidebar

Install

npm i braintrust

Weekly Downloads

12,183

Version

0.0.99

License

MIT

Unpacked Size

1.08 MB

Total Files

24

Last publish

Collaborators

  • braintrust