braintrust 1.0.0-rc.1 → 1.0.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 +3 -5
- package/dev/dist/index.d.mts +3 -0
- package/dev/dist/index.d.ts +3 -0
- package/dev/dist/index.js +331 -194
- package/dev/dist/index.mjs +284 -147
- package/dist/browser.d.mts +11 -2
- package/dist/browser.d.ts +11 -2
- package/dist/browser.js +215 -169
- package/dist/browser.mjs +112 -66
- package/dist/cli.js +386 -231
- package/dist/index.d.mts +47 -4
- package/dist/index.d.ts +47 -4
- package/dist/index.js +417 -278
- package/dist/index.mjs +292 -153
- package/package.json +22 -23
- package/LICENSE +0 -201
package/README.md
CHANGED
|
@@ -2,13 +2,11 @@ An isomorphic JS library for logging data to Braintrust.
|
|
|
2
2
|
|
|
3
3
|
## Version information
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**1.x** is the current stable release with improved ESM support. OpenTelemetry integration is available via the separate [`@braintrust/otel`](https://www.npmjs.com/package/@braintrust/otel) package.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Upgrading from 0.x
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
**Recommendation**: Use the latest 1.x release. If you encounter any issues, please reach out to [support@braintrust.dev](mailto:support@braintrust.dev).
|
|
9
|
+
If you're on version **0.4.10 or earlier**, we recommend upgrading to **1.x**. See the [TypeScript SDK upgrade guide](https://www.braintrust.dev/docs/reference/sdks/typescript-upgrade-guide) for migration instructions.
|
|
12
10
|
|
|
13
11
|
### Quickstart
|
|
14
12
|
|
package/dev/dist/index.d.mts
CHANGED
|
@@ -8428,6 +8428,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
|
|
|
8428
8428
|
queueDropLoggingPeriod: number;
|
|
8429
8429
|
failedPublishPayloadsDir: string | undefined;
|
|
8430
8430
|
allPublishPayloadsDir: string | undefined;
|
|
8431
|
+
flushChunkSize: number;
|
|
8431
8432
|
private _disabled;
|
|
8432
8433
|
private queueDropLoggingState;
|
|
8433
8434
|
constructor(apiConn: LazyValue<HTTPConnection>, opts?: BackgroundLoggerOpts);
|
|
@@ -8435,6 +8436,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
|
|
|
8435
8436
|
log(items: LazyValue<BackgroundLogEvent>[]): void;
|
|
8436
8437
|
flush(): Promise<void>;
|
|
8437
8438
|
private flushOnce;
|
|
8439
|
+
private flushWrappedItemsChunk;
|
|
8438
8440
|
private unwrapLazyValues;
|
|
8439
8441
|
private submitLogsRequest;
|
|
8440
8442
|
private registerDroppedItemCount;
|
|
@@ -8514,6 +8516,7 @@ declare class ObjectFetcher<RecordType> implements AsyncIterable<WithTransaction
|
|
|
8514
8516
|
constructor(objectType: "dataset" | "experiment", pinnedVersion: string | undefined, mutateRecord?: ((r: any) => WithTransactionId<RecordType>) | undefined, _internal_btql?: Record<string, unknown> | undefined);
|
|
8515
8517
|
get id(): Promise<string>;
|
|
8516
8518
|
protected getState(): Promise<BraintrustState>;
|
|
8519
|
+
private fetchRecordsFromApi;
|
|
8517
8520
|
fetch(): AsyncGenerator<WithTransactionId<RecordType>>;
|
|
8518
8521
|
[Symbol.asyncIterator](): AsyncIterator<WithTransactionId<RecordType>>;
|
|
8519
8522
|
fetchedData(): Promise<WithTransactionId<RecordType>[]>;
|
package/dev/dist/index.d.ts
CHANGED
|
@@ -8428,6 +8428,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
|
|
|
8428
8428
|
queueDropLoggingPeriod: number;
|
|
8429
8429
|
failedPublishPayloadsDir: string | undefined;
|
|
8430
8430
|
allPublishPayloadsDir: string | undefined;
|
|
8431
|
+
flushChunkSize: number;
|
|
8431
8432
|
private _disabled;
|
|
8432
8433
|
private queueDropLoggingState;
|
|
8433
8434
|
constructor(apiConn: LazyValue<HTTPConnection>, opts?: BackgroundLoggerOpts);
|
|
@@ -8435,6 +8436,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
|
|
|
8435
8436
|
log(items: LazyValue<BackgroundLogEvent>[]): void;
|
|
8436
8437
|
flush(): Promise<void>;
|
|
8437
8438
|
private flushOnce;
|
|
8439
|
+
private flushWrappedItemsChunk;
|
|
8438
8440
|
private unwrapLazyValues;
|
|
8439
8441
|
private submitLogsRequest;
|
|
8440
8442
|
private registerDroppedItemCount;
|
|
@@ -8514,6 +8516,7 @@ declare class ObjectFetcher<RecordType> implements AsyncIterable<WithTransaction
|
|
|
8514
8516
|
constructor(objectType: "dataset" | "experiment", pinnedVersion: string | undefined, mutateRecord?: ((r: any) => WithTransactionId<RecordType>) | undefined, _internal_btql?: Record<string, unknown> | undefined);
|
|
8515
8517
|
get id(): Promise<string>;
|
|
8516
8518
|
protected getState(): Promise<BraintrustState>;
|
|
8519
|
+
private fetchRecordsFromApi;
|
|
8517
8520
|
fetch(): AsyncGenerator<WithTransactionId<RecordType>>;
|
|
8518
8521
|
[Symbol.asyncIterator](): AsyncIterator<WithTransactionId<RecordType>>;
|
|
8519
8522
|
fetchedData(): Promise<WithTransactionId<RecordType>[]>;
|