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

0.0.167 • 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

41,814

Version

0.0.167

License

MIT

Unpacked Size

1.27 MB

Total Files

17

Last publish

Collaborators

  • braintrust