braintrust 0.0.209 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -15
- package/dev/dist/index.d.mts +205 -253
- package/dev/dist/index.d.ts +205 -253
- package/dev/dist/index.js +855 -655
- package/dev/dist/index.mjs +257 -71
- package/dist/browser.d.mts +1443 -1701
- package/dist/browser.d.ts +1443 -1701
- package/dist/browser.js +690 -706
- package/dist/browser.mjs +128 -91
- package/dist/cli.js +313 -97
- package/dist/index.d.mts +1734 -2087
- package/dist/index.d.ts +1734 -2087
- package/dist/index.js +895 -929
- package/dist/index.mjs +142 -104
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -14,19 +14,23 @@ your Braintrust API key):
|
|
|
14
14
|
```javascript
|
|
15
15
|
import * as braintrust from "braintrust";
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
17
|
+
async function main() {
|
|
18
|
+
const experiment = await braintrust.init("NodeTest", {
|
|
19
|
+
apiKey: "YOUR_API_KEY",
|
|
20
|
+
});
|
|
21
|
+
experiment.log({
|
|
22
|
+
input: { test: 1 },
|
|
23
|
+
output: "foo",
|
|
24
|
+
expected: "bar",
|
|
25
|
+
scores: {
|
|
26
|
+
n: 0.5,
|
|
27
|
+
},
|
|
28
|
+
metadata: {
|
|
29
|
+
id: 1,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
console.log(await experiment.summarize());
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
main().catch(console.error);
|
|
32
36
|
```
|