braintrust 3.8.0 → 3.10.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/dev/dist/index.d.mts +191 -4
- package/dev/dist/index.d.ts +191 -4
- package/dev/dist/index.js +7269 -2590
- package/dev/dist/index.mjs +7281 -2602
- package/dist/auto-instrumentations/bundler/esbuild.cjs +741 -2
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +741 -2
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +741 -2
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +738 -2
- package/dist/auto-instrumentations/bundler/webpack.cjs +741 -2
- package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
- package/dist/auto-instrumentations/{chunk-OLBMPZXE.mjs → chunk-GZNXBBPU.mjs} +741 -3
- package/dist/auto-instrumentations/{chunk-MD7W27YH.mjs → chunk-XWEQQOQH.mjs} +12 -1
- package/dist/auto-instrumentations/hook.mjs +1193 -199
- package/dist/auto-instrumentations/index.cjs +1173 -187
- package/dist/auto-instrumentations/index.d.mts +22 -1
- package/dist/auto-instrumentations/index.d.ts +22 -1
- package/dist/auto-instrumentations/index.mjs +256 -1
- package/dist/auto-instrumentations/loader/esm-hook.mjs +2 -1
- package/dist/browser.d.mts +451 -11
- package/dist/browser.d.ts +451 -11
- package/dist/browser.js +7659 -2321
- package/dist/browser.mjs +7659 -2321
- package/dist/cli.js +7143 -2435
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +7659 -2321
- package/dist/edge-light.mjs +7659 -2321
- package/dist/index.d.mts +451 -11
- package/dist/index.d.ts +451 -11
- package/dist/index.js +8054 -2716
- package/dist/index.mjs +7659 -2321
- package/dist/instrumentation/index.d.mts +17 -0
- package/dist/instrumentation/index.d.ts +17 -0
- package/dist/instrumentation/index.js +6420 -2051
- package/dist/instrumentation/index.mjs +6420 -2051
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +7659 -2321
- package/dist/workerd.mjs +7659 -2321
- package/package.json +56 -51
- package/util/dist/index.d.mts +42 -1
- package/util/dist/index.d.ts +42 -1
- package/util/dist/index.js +5 -1
- package/util/dist/index.mjs +4 -0
- package/LICENSE +0 -201
package/dist/browser.d.ts
CHANGED
|
@@ -1246,6 +1246,29 @@ declare const SavedFunctionId: z.ZodUnion<[z.ZodObject<{
|
|
|
1246
1246
|
function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
|
|
1247
1247
|
}>]>;
|
|
1248
1248
|
type SavedFunctionIdType = z.infer<typeof SavedFunctionId>;
|
|
1249
|
+
declare const DatasetSnapshot: z.ZodObject<{
|
|
1250
|
+
id: z.ZodString;
|
|
1251
|
+
dataset_id: z.ZodString;
|
|
1252
|
+
name: z.ZodString;
|
|
1253
|
+
description: z.ZodUnion<[z.ZodString, z.ZodNull]>;
|
|
1254
|
+
xact_id: z.ZodString;
|
|
1255
|
+
created: z.ZodUnion<[z.ZodString, z.ZodNull]>;
|
|
1256
|
+
}, "strip", z.ZodTypeAny, {
|
|
1257
|
+
id: string;
|
|
1258
|
+
created: string | null;
|
|
1259
|
+
name: string;
|
|
1260
|
+
description: string | null;
|
|
1261
|
+
dataset_id: string;
|
|
1262
|
+
xact_id: string;
|
|
1263
|
+
}, {
|
|
1264
|
+
id: string;
|
|
1265
|
+
created: string | null;
|
|
1266
|
+
name: string;
|
|
1267
|
+
description: string | null;
|
|
1268
|
+
dataset_id: string;
|
|
1269
|
+
xact_id: string;
|
|
1270
|
+
}>;
|
|
1271
|
+
type DatasetSnapshotType = z.infer<typeof DatasetSnapshot>;
|
|
1249
1272
|
declare const RepoInfo: z.ZodUnion<[z.ZodObject<{
|
|
1250
1273
|
commit: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1251
1274
|
branch: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -4758,6 +4781,15 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4758
4781
|
}, {
|
|
4759
4782
|
type: "scorer";
|
|
4760
4783
|
index: number;
|
|
4784
|
+
}>, z.ZodObject<{
|
|
4785
|
+
type: z.ZodLiteral<"classifier">;
|
|
4786
|
+
index: z.ZodNumber;
|
|
4787
|
+
}, "strip", z.ZodTypeAny, {
|
|
4788
|
+
type: "classifier";
|
|
4789
|
+
index: number;
|
|
4790
|
+
}, {
|
|
4791
|
+
type: "classifier";
|
|
4792
|
+
index: number;
|
|
4761
4793
|
}>]>;
|
|
4762
4794
|
}, "strip", z.ZodTypeAny, {
|
|
4763
4795
|
type: "experiment";
|
|
@@ -4767,6 +4799,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4767
4799
|
} | {
|
|
4768
4800
|
type: "scorer";
|
|
4769
4801
|
index: number;
|
|
4802
|
+
} | {
|
|
4803
|
+
type: "classifier";
|
|
4804
|
+
index: number;
|
|
4770
4805
|
};
|
|
4771
4806
|
}, {
|
|
4772
4807
|
type: "experiment";
|
|
@@ -4776,6 +4811,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4776
4811
|
} | {
|
|
4777
4812
|
type: "scorer";
|
|
4778
4813
|
index: number;
|
|
4814
|
+
} | {
|
|
4815
|
+
type: "classifier";
|
|
4816
|
+
index: number;
|
|
4779
4817
|
};
|
|
4780
4818
|
}>, z.ZodObject<{
|
|
4781
4819
|
type: z.ZodLiteral<"function">;
|
|
@@ -4848,6 +4886,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4848
4886
|
} | {
|
|
4849
4887
|
type: "scorer";
|
|
4850
4888
|
index: number;
|
|
4889
|
+
} | {
|
|
4890
|
+
type: "classifier";
|
|
4891
|
+
index: number;
|
|
4851
4892
|
};
|
|
4852
4893
|
} | {
|
|
4853
4894
|
type: "function";
|
|
@@ -4880,6 +4921,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4880
4921
|
} | {
|
|
4881
4922
|
type: "scorer";
|
|
4882
4923
|
index: number;
|
|
4924
|
+
} | {
|
|
4925
|
+
type: "classifier";
|
|
4926
|
+
index: number;
|
|
4883
4927
|
};
|
|
4884
4928
|
} | {
|
|
4885
4929
|
type: "function";
|
|
@@ -4947,6 +4991,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4947
4991
|
} | {
|
|
4948
4992
|
type: "scorer";
|
|
4949
4993
|
index: number;
|
|
4994
|
+
} | {
|
|
4995
|
+
type: "classifier";
|
|
4996
|
+
index: number;
|
|
4950
4997
|
};
|
|
4951
4998
|
} | {
|
|
4952
4999
|
type: "function";
|
|
@@ -4992,6 +5039,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4992
5039
|
} | {
|
|
4993
5040
|
type: "scorer";
|
|
4994
5041
|
index: number;
|
|
5042
|
+
} | {
|
|
5043
|
+
type: "classifier";
|
|
5044
|
+
index: number;
|
|
4995
5045
|
};
|
|
4996
5046
|
} | {
|
|
4997
5047
|
type: "function";
|
|
@@ -6612,6 +6662,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6612
6662
|
hierarchy_threshold?: number | undefined;
|
|
6613
6663
|
naming_model?: string | undefined;
|
|
6614
6664
|
}>>;
|
|
6665
|
+
disable_reconciliation: z.ZodOptional<z.ZodBoolean>;
|
|
6615
6666
|
distance_threshold: z.ZodOptional<z.ZodNumber>;
|
|
6616
6667
|
}, "strip", z.ZodTypeAny, {
|
|
6617
6668
|
type: "topic_map";
|
|
@@ -6630,6 +6681,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6630
6681
|
hierarchy_threshold?: number | undefined;
|
|
6631
6682
|
naming_model?: string | undefined;
|
|
6632
6683
|
} | undefined;
|
|
6684
|
+
disable_reconciliation?: boolean | undefined;
|
|
6633
6685
|
distance_threshold?: number | undefined;
|
|
6634
6686
|
}, {
|
|
6635
6687
|
type: "topic_map";
|
|
@@ -6648,6 +6700,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6648
6700
|
hierarchy_threshold?: number | undefined;
|
|
6649
6701
|
naming_model?: string | undefined;
|
|
6650
6702
|
} | undefined;
|
|
6703
|
+
disable_reconciliation?: boolean | undefined;
|
|
6651
6704
|
distance_threshold?: number | undefined;
|
|
6652
6705
|
}>;
|
|
6653
6706
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -6669,6 +6722,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6669
6722
|
hierarchy_threshold?: number | undefined;
|
|
6670
6723
|
naming_model?: string | undefined;
|
|
6671
6724
|
} | undefined;
|
|
6725
|
+
disable_reconciliation?: boolean | undefined;
|
|
6672
6726
|
distance_threshold?: number | undefined;
|
|
6673
6727
|
};
|
|
6674
6728
|
topic_map_id?: string | undefined;
|
|
@@ -6691,6 +6745,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6691
6745
|
hierarchy_threshold?: number | undefined;
|
|
6692
6746
|
naming_model?: string | undefined;
|
|
6693
6747
|
} | undefined;
|
|
6748
|
+
disable_reconciliation?: boolean | undefined;
|
|
6694
6749
|
distance_threshold?: number | undefined;
|
|
6695
6750
|
};
|
|
6696
6751
|
topic_map_id?: string | undefined;
|
|
@@ -6732,6 +6787,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6732
6787
|
hierarchy_threshold?: number | undefined;
|
|
6733
6788
|
naming_model?: string | undefined;
|
|
6734
6789
|
} | undefined;
|
|
6790
|
+
disable_reconciliation?: boolean | undefined;
|
|
6735
6791
|
distance_threshold?: number | undefined;
|
|
6736
6792
|
};
|
|
6737
6793
|
topic_map_id?: string | undefined;
|
|
@@ -6773,6 +6829,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6773
6829
|
hierarchy_threshold?: number | undefined;
|
|
6774
6830
|
naming_model?: string | undefined;
|
|
6775
6831
|
} | undefined;
|
|
6832
|
+
disable_reconciliation?: boolean | undefined;
|
|
6776
6833
|
distance_threshold?: number | undefined;
|
|
6777
6834
|
};
|
|
6778
6835
|
topic_map_id?: string | undefined;
|
|
@@ -6853,6 +6910,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6853
6910
|
hierarchy_threshold?: number | undefined;
|
|
6854
6911
|
naming_model?: string | undefined;
|
|
6855
6912
|
}>>;
|
|
6913
|
+
disable_reconciliation: z.ZodOptional<z.ZodBoolean>;
|
|
6856
6914
|
distance_threshold: z.ZodOptional<z.ZodNumber>;
|
|
6857
6915
|
}, "strip", z.ZodTypeAny, {
|
|
6858
6916
|
type: "topic_map";
|
|
@@ -6871,6 +6929,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6871
6929
|
hierarchy_threshold?: number | undefined;
|
|
6872
6930
|
naming_model?: string | undefined;
|
|
6873
6931
|
} | undefined;
|
|
6932
|
+
disable_reconciliation?: boolean | undefined;
|
|
6874
6933
|
distance_threshold?: number | undefined;
|
|
6875
6934
|
}, {
|
|
6876
6935
|
type: "topic_map";
|
|
@@ -6889,6 +6948,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6889
6948
|
hierarchy_threshold?: number | undefined;
|
|
6890
6949
|
naming_model?: string | undefined;
|
|
6891
6950
|
} | undefined;
|
|
6951
|
+
disable_reconciliation?: boolean | undefined;
|
|
6892
6952
|
distance_threshold?: number | undefined;
|
|
6893
6953
|
}>, z.ZodUnknown>]>;
|
|
6894
6954
|
declare const PromptData: z.ZodObject<{
|
|
@@ -16106,6 +16166,10 @@ type OtherExperimentLogFields = {
|
|
|
16106
16166
|
error: unknown;
|
|
16107
16167
|
tags: string[];
|
|
16108
16168
|
scores: Record<string, number | null>;
|
|
16169
|
+
classifications?: Record<string, {
|
|
16170
|
+
id: string;
|
|
16171
|
+
label?: string;
|
|
16172
|
+
}[]>;
|
|
16109
16173
|
metadata: Record<string, unknown>;
|
|
16110
16174
|
metrics: Record<string, unknown>;
|
|
16111
16175
|
datasetRecordId: string;
|
|
@@ -16273,6 +16337,42 @@ declare class SpanComponentsV3 {
|
|
|
16273
16337
|
private static fromJsonObj;
|
|
16274
16338
|
}
|
|
16275
16339
|
|
|
16340
|
+
/**
|
|
16341
|
+
* The result returned by a classifier function. Unlike `Score`, `id` is
|
|
16342
|
+
* required and the span will be recorded as a classifier span.
|
|
16343
|
+
*/
|
|
16344
|
+
interface Classification {
|
|
16345
|
+
/**
|
|
16346
|
+
* The name of this classification result. Used as the key in the
|
|
16347
|
+
* `classifications` log record. If omitted, defaults to the classifier
|
|
16348
|
+
* function's name.
|
|
16349
|
+
*/
|
|
16350
|
+
name: string;
|
|
16351
|
+
/**
|
|
16352
|
+
* A machine-readable identifier for the classification outcome
|
|
16353
|
+
* (e.g. `"positive"`, `"negative"`, `"neutral"`). This value is stored
|
|
16354
|
+
* in the log and used for programmatic analysis.
|
|
16355
|
+
*/
|
|
16356
|
+
id: string;
|
|
16357
|
+
/**
|
|
16358
|
+
* An optional human-readable display label for this outcome. If omitted,
|
|
16359
|
+
* defaults to `id`. Use this when you want a friendlier label in the UI
|
|
16360
|
+
* while keeping a stable `id` for programmatic use.
|
|
16361
|
+
*/
|
|
16362
|
+
label?: string;
|
|
16363
|
+
/**
|
|
16364
|
+
* Optional arbitrary metadata to attach to this classification result.
|
|
16365
|
+
*/
|
|
16366
|
+
metadata?: Record<string, unknown>;
|
|
16367
|
+
}
|
|
16368
|
+
/**
|
|
16369
|
+
* The serialized form of a classification stored in the `classifications` log record.
|
|
16370
|
+
*/
|
|
16371
|
+
interface ClassificationItem {
|
|
16372
|
+
id: string;
|
|
16373
|
+
label: string;
|
|
16374
|
+
metadata?: Record<string, unknown>;
|
|
16375
|
+
}
|
|
16276
16376
|
interface Score {
|
|
16277
16377
|
name: string;
|
|
16278
16378
|
score: number | null;
|
|
@@ -18481,6 +18581,32 @@ type InferParameters<T extends EvalParameters> = {
|
|
|
18481
18581
|
declare const LOGS3_OVERFLOW_REFERENCE_TYPE = "logs3_overflow";
|
|
18482
18582
|
declare const RESET_CONTEXT_MANAGER_STATE: unique symbol;
|
|
18483
18583
|
declare const DEFAULT_MAX_REQUEST_SIZE: number;
|
|
18584
|
+
|
|
18585
|
+
declare const datasetRestorePreviewResultSchema: z.ZodObject<{
|
|
18586
|
+
rows_to_restore: z.ZodNumber;
|
|
18587
|
+
rows_to_delete: z.ZodNumber;
|
|
18588
|
+
}, "strip", z.ZodTypeAny, {
|
|
18589
|
+
rows_to_restore: number;
|
|
18590
|
+
rows_to_delete: number;
|
|
18591
|
+
}, {
|
|
18592
|
+
rows_to_restore: number;
|
|
18593
|
+
rows_to_delete: number;
|
|
18594
|
+
}>;
|
|
18595
|
+
type DatasetRestorePreviewResult = z.infer<typeof datasetRestorePreviewResultSchema>;
|
|
18596
|
+
declare const datasetRestoreResultSchema: z.ZodObject<{
|
|
18597
|
+
xact_id: z.ZodNullable<z.ZodString>;
|
|
18598
|
+
rows_restored: z.ZodNumber;
|
|
18599
|
+
rows_deleted: z.ZodNumber;
|
|
18600
|
+
}, "strip", z.ZodTypeAny, {
|
|
18601
|
+
xact_id: string | null;
|
|
18602
|
+
rows_restored: number;
|
|
18603
|
+
rows_deleted: number;
|
|
18604
|
+
}, {
|
|
18605
|
+
xact_id: string | null;
|
|
18606
|
+
rows_restored: number;
|
|
18607
|
+
rows_deleted: number;
|
|
18608
|
+
}>;
|
|
18609
|
+
type DatasetRestoreResult = z.infer<typeof datasetRestoreResultSchema>;
|
|
18484
18610
|
declare const parametersRowSchema: z.ZodObject<{
|
|
18485
18611
|
id: z.ZodString;
|
|
18486
18612
|
_xact_id: z.ZodString;
|
|
@@ -19447,12 +19573,30 @@ type InitOpenOption<IsOpen extends boolean> = {
|
|
|
19447
19573
|
open?: IsOpen;
|
|
19448
19574
|
};
|
|
19449
19575
|
/**
|
|
19450
|
-
* Reference to a dataset by ID and optional
|
|
19576
|
+
* Reference to a dataset by ID and optional explicit selector.
|
|
19451
19577
|
*/
|
|
19452
|
-
|
|
19453
|
-
id: string;
|
|
19578
|
+
type DatasetSelection = {
|
|
19454
19579
|
version?: string;
|
|
19455
|
-
|
|
19580
|
+
environment?: string;
|
|
19581
|
+
snapshotName?: string;
|
|
19582
|
+
};
|
|
19583
|
+
type DatasetSnapshotNameLookup = {
|
|
19584
|
+
snapshotName: string;
|
|
19585
|
+
xactId?: never;
|
|
19586
|
+
};
|
|
19587
|
+
type DatasetSnapshotXactLookup = {
|
|
19588
|
+
snapshotName?: never;
|
|
19589
|
+
xactId: string;
|
|
19590
|
+
};
|
|
19591
|
+
type DatasetSnapshotLookup = DatasetSnapshotNameLookup | DatasetSnapshotXactLookup;
|
|
19592
|
+
type DatasetPinState = {
|
|
19593
|
+
lazyPinnedVersion?: LazyValue<string | undefined>;
|
|
19594
|
+
pinnedEnvironment?: string;
|
|
19595
|
+
pinnedSnapshotName?: string;
|
|
19596
|
+
};
|
|
19597
|
+
type DatasetRef = {
|
|
19598
|
+
id: string;
|
|
19599
|
+
} & DatasetSelection;
|
|
19456
19600
|
interface ParametersRef {
|
|
19457
19601
|
id: string;
|
|
19458
19602
|
version?: string;
|
|
@@ -19461,6 +19605,7 @@ type InitOptions<IsOpen extends boolean> = FullLoginOptions & {
|
|
|
19461
19605
|
experiment?: string;
|
|
19462
19606
|
description?: string;
|
|
19463
19607
|
dataset?: AnyDataset | DatasetRef;
|
|
19608
|
+
_internal_btql?: Record<string, unknown>;
|
|
19464
19609
|
parameters?: ParametersRef | RemoteEvalParameters<boolean, boolean>;
|
|
19465
19610
|
update?: boolean;
|
|
19466
19611
|
baseExperiment?: string;
|
|
@@ -19531,6 +19676,8 @@ type InitDatasetOptions<IsLegacyDataset extends boolean> = FullLoginOptions & {
|
|
|
19531
19676
|
dataset?: string;
|
|
19532
19677
|
description?: string;
|
|
19533
19678
|
version?: string;
|
|
19679
|
+
environment?: string;
|
|
19680
|
+
snapshotName?: string;
|
|
19534
19681
|
projectId?: string;
|
|
19535
19682
|
metadata?: Record<string, unknown>;
|
|
19536
19683
|
state?: BraintrustState;
|
|
@@ -19546,6 +19693,9 @@ type FullInitDatasetOptions<IsLegacyDataset extends boolean> = {
|
|
|
19546
19693
|
* @param options.project The name of the project to create the dataset in. Must specify at least one of `project` or `projectId`.
|
|
19547
19694
|
* @param options.dataset The name of the dataset to create. If not specified, a name will be generated automatically.
|
|
19548
19695
|
* @param options.description An optional description of the dataset.
|
|
19696
|
+
* @param options.version Pin the dataset to a specific version xact_id. If `snapshotName` or `environment` are also provided, `version` takes precedence.
|
|
19697
|
+
* @param options.snapshotName Pin the dataset to the version captured by this named snapshot. If `environment` is also provided, `snapshotName` takes precedence.
|
|
19698
|
+
* @param options.environment Pin the dataset to the version tagged with this environment slug.
|
|
19549
19699
|
* @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
|
|
19550
19700
|
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. If no API key is specified, will prompt the user to login.
|
|
19551
19701
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
@@ -19938,6 +20088,9 @@ declare class ObjectFetcher<RecordType> implements AsyncIterable<WithTransaction
|
|
|
19938
20088
|
constructor(objectType: "dataset" | "experiment" | "project_logs" | "playground_logs", pinnedVersion: string | undefined, mutateRecord?: ((r: any) => WithTransactionId<RecordType>) | undefined, _internal_btql?: Record<string, unknown> | undefined);
|
|
19939
20089
|
get id(): Promise<string>;
|
|
19940
20090
|
protected getState(): Promise<BraintrustState>;
|
|
20091
|
+
protected getPinnedVersion(): string | undefined;
|
|
20092
|
+
protected setPinnedVersion(pinnedVersion: string | undefined): void;
|
|
20093
|
+
protected getInternalBtql(): Record<string, unknown> | undefined;
|
|
19941
20094
|
private fetchRecordsFromApi;
|
|
19942
20095
|
/**
|
|
19943
20096
|
* Fetch all records from the object.
|
|
@@ -19967,6 +20120,7 @@ type EvalCase<Input, Expected, Metadata> = {
|
|
|
19967
20120
|
_xact_id?: TransactionId;
|
|
19968
20121
|
created?: string | null;
|
|
19969
20122
|
upsert_id?: string;
|
|
20123
|
+
trialCount?: number;
|
|
19970
20124
|
} & (Expected extends void ? object : {
|
|
19971
20125
|
expected: Expected;
|
|
19972
20126
|
}) & (Metadata extends void ? object : {
|
|
@@ -20174,12 +20328,25 @@ declare class Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY
|
|
|
20174
20328
|
private readonly lazyMetadata;
|
|
20175
20329
|
private readonly __braintrust_dataset_marker;
|
|
20176
20330
|
private newRecords;
|
|
20177
|
-
|
|
20331
|
+
private lazyPinnedVersion?;
|
|
20332
|
+
private pinnedEnvironment?;
|
|
20333
|
+
private pinnedSnapshotName?;
|
|
20334
|
+
constructor(state: BraintrustState, lazyMetadata: LazyValue<ProjectDatasetMetadata>, pinnedVersion?: string, legacy?: IsLegacyDataset, _internal_btql?: Record<string, unknown>, pinState?: DatasetPinState);
|
|
20178
20335
|
get id(): Promise<string>;
|
|
20179
20336
|
get name(): Promise<string>;
|
|
20180
20337
|
get project(): Promise<ObjectMetadata>;
|
|
20181
20338
|
get loggingState(): BraintrustState;
|
|
20339
|
+
toEvalData(): Promise<{
|
|
20340
|
+
dataset_id: string;
|
|
20341
|
+
dataset_version?: string;
|
|
20342
|
+
dataset_environment?: string;
|
|
20343
|
+
dataset_snapshot_name?: string;
|
|
20344
|
+
_internal_btql?: Record<string, unknown>;
|
|
20345
|
+
}>;
|
|
20182
20346
|
protected getState(): Promise<BraintrustState>;
|
|
20347
|
+
version(options?: {
|
|
20348
|
+
batchSize?: number;
|
|
20349
|
+
}): Promise<string | undefined>;
|
|
20183
20350
|
private validateEvent;
|
|
20184
20351
|
private createArgs;
|
|
20185
20352
|
/**
|
|
@@ -20227,6 +20394,24 @@ declare class Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY
|
|
|
20227
20394
|
readonly metadata?: Record<string, unknown>;
|
|
20228
20395
|
}): string;
|
|
20229
20396
|
delete(id: string): string;
|
|
20397
|
+
createSnapshot({ name, description, update, }: {
|
|
20398
|
+
readonly name: string;
|
|
20399
|
+
readonly description?: string;
|
|
20400
|
+
readonly update?: boolean;
|
|
20401
|
+
}): Promise<DatasetSnapshotType>;
|
|
20402
|
+
listSnapshots(): Promise<DatasetSnapshotType[]>;
|
|
20403
|
+
getSnapshot(lookup: DatasetSnapshotLookup): Promise<DatasetSnapshotType | undefined>;
|
|
20404
|
+
updateSnapshot(snapshotId: string, { name, description, }: {
|
|
20405
|
+
readonly name?: string;
|
|
20406
|
+
readonly description?: string | null;
|
|
20407
|
+
}): Promise<DatasetSnapshotType>;
|
|
20408
|
+
deleteSnapshot(snapshotId: string): Promise<DatasetSnapshotType>;
|
|
20409
|
+
restorePreview({ version, }: {
|
|
20410
|
+
readonly version: string;
|
|
20411
|
+
}): Promise<DatasetRestorePreviewResult>;
|
|
20412
|
+
restore({ version, }: {
|
|
20413
|
+
readonly version: string;
|
|
20414
|
+
}): Promise<DatasetRestoreResult>;
|
|
20230
20415
|
/**
|
|
20231
20416
|
* Summarize the dataset, including high level metrics about its size and other metadata.
|
|
20232
20417
|
* @param summarizeData Whether to summarize the data. If false, only the metadata will be returned.
|
|
@@ -21024,14 +21209,27 @@ interface OpenAIChatToolCall {
|
|
|
21024
21209
|
interface OpenAIChatMessage {
|
|
21025
21210
|
role?: string;
|
|
21026
21211
|
content?: unknown;
|
|
21212
|
+
refusal?: string;
|
|
21027
21213
|
tool_calls?: OpenAIChatToolCall[];
|
|
21028
21214
|
[key: string]: unknown;
|
|
21029
21215
|
}
|
|
21216
|
+
interface OpenAIChatTokenLogprob {
|
|
21217
|
+
token?: string;
|
|
21218
|
+
logprob?: number;
|
|
21219
|
+
bytes?: number[] | null;
|
|
21220
|
+
top_logprobs?: OpenAIChatTokenLogprob[];
|
|
21221
|
+
[key: string]: unknown;
|
|
21222
|
+
}
|
|
21223
|
+
interface OpenAIChatLogprobs {
|
|
21224
|
+
content?: OpenAIChatTokenLogprob[] | null;
|
|
21225
|
+
refusal?: OpenAIChatTokenLogprob[] | null;
|
|
21226
|
+
[key: string]: unknown;
|
|
21227
|
+
}
|
|
21030
21228
|
interface OpenAIChatChoice {
|
|
21031
21229
|
index: number;
|
|
21032
21230
|
message: OpenAIChatMessage;
|
|
21033
21231
|
finish_reason?: string | null;
|
|
21034
|
-
logprobs?:
|
|
21232
|
+
logprobs?: OpenAIChatLogprobs | null;
|
|
21035
21233
|
[key: string]: unknown;
|
|
21036
21234
|
}
|
|
21037
21235
|
interface OpenAIChatCompletion {
|
|
@@ -21042,6 +21240,7 @@ interface OpenAIChatCompletion {
|
|
|
21042
21240
|
interface OpenAIChatDelta {
|
|
21043
21241
|
role?: string;
|
|
21044
21242
|
content?: string;
|
|
21243
|
+
refusal?: string;
|
|
21045
21244
|
tool_calls?: OpenAIChatToolCall[];
|
|
21046
21245
|
finish_reason?: string | null;
|
|
21047
21246
|
[key: string]: unknown;
|
|
@@ -21049,6 +21248,7 @@ interface OpenAIChatDelta {
|
|
|
21049
21248
|
interface OpenAIChatChunkChoice {
|
|
21050
21249
|
delta?: OpenAIChatDelta;
|
|
21051
21250
|
finish_reason?: string | null;
|
|
21251
|
+
logprobs?: OpenAIChatLogprobs | null;
|
|
21052
21252
|
[key: string]: unknown;
|
|
21053
21253
|
}
|
|
21054
21254
|
interface OpenAIChatCompletionChunk {
|
|
@@ -21260,6 +21460,12 @@ declare function wrapMastraAgent<T>(agent: T, _options?: {
|
|
|
21260
21460
|
*/
|
|
21261
21461
|
declare function wrapClaudeAgentSDK<T extends object>(sdk: T): T;
|
|
21262
21462
|
|
|
21463
|
+
/**
|
|
21464
|
+
* Wraps the Cursor TypeScript SDK with Braintrust tracing. The wrapper emits
|
|
21465
|
+
* diagnostics-channel events; the Cursor SDK plugin owns span lifecycle.
|
|
21466
|
+
*/
|
|
21467
|
+
declare function wrapCursorSDK<T>(sdk: T): T;
|
|
21468
|
+
|
|
21263
21469
|
/**
|
|
21264
21470
|
* Wrap a Google GenAI module (imported with `import * as googleGenAI from '@google/genai'`) to add tracing.
|
|
21265
21471
|
* If Braintrust is not configured, nothing will be traced.
|
|
@@ -21279,6 +21485,178 @@ declare function wrapClaudeAgentSDK<T extends object>(sdk: T): T;
|
|
|
21279
21485
|
*/
|
|
21280
21486
|
declare function wrapGoogleGenAI<T extends Record<string, any>>(googleGenAI: T): T;
|
|
21281
21487
|
|
|
21488
|
+
/**
|
|
21489
|
+
* Wrap a Google ADK module (imported with `import * as adk from '@google/adk'`) to add tracing.
|
|
21490
|
+
* If Braintrust is not configured, nothing will be traced.
|
|
21491
|
+
*
|
|
21492
|
+
* This wraps:
|
|
21493
|
+
* - Runner.runAsync / InMemoryRunner.runAsync — top-level agent execution
|
|
21494
|
+
* - BaseAgent.runAsync (and all subclasses) — individual agent invocations
|
|
21495
|
+
* - BaseTool.runAsync / FunctionTool.runAsync — tool execution
|
|
21496
|
+
*
|
|
21497
|
+
* LLM calls are already traced via the existing @google/genai instrumentation,
|
|
21498
|
+
* since ADK uses GenAI internally.
|
|
21499
|
+
*
|
|
21500
|
+
* @param adkModule The Google ADK module
|
|
21501
|
+
* @returns The wrapped Google ADK module
|
|
21502
|
+
*
|
|
21503
|
+
* @example
|
|
21504
|
+
* ```typescript
|
|
21505
|
+
* import * as adk from '@google/adk';
|
|
21506
|
+
* import { wrapGoogleADK, initLogger } from 'braintrust';
|
|
21507
|
+
*
|
|
21508
|
+
* initLogger({ projectName: 'Your project' });
|
|
21509
|
+
* const { LlmAgent, InMemoryRunner } = wrapGoogleADK(adk);
|
|
21510
|
+
*
|
|
21511
|
+
* const agent = new LlmAgent({ name: 'my_agent', model: 'gemini-2.5-flash' });
|
|
21512
|
+
* const runner = new InMemoryRunner({ agent });
|
|
21513
|
+
* for await (const event of runner.runAsync({ userId: 'u1', sessionId: 's1', newMessage: ... })) {
|
|
21514
|
+
* console.log(event);
|
|
21515
|
+
* }
|
|
21516
|
+
* ```
|
|
21517
|
+
*/
|
|
21518
|
+
declare function wrapGoogleADK<T extends Record<string, any>>(adkModule: T): T;
|
|
21519
|
+
|
|
21520
|
+
interface HuggingFaceRequestOptions {
|
|
21521
|
+
retry_on_error?: boolean;
|
|
21522
|
+
fetch?: typeof fetch;
|
|
21523
|
+
signal?: AbortSignal;
|
|
21524
|
+
includeCredentials?: string | boolean;
|
|
21525
|
+
billTo?: string;
|
|
21526
|
+
[key: string]: unknown;
|
|
21527
|
+
}
|
|
21528
|
+
interface HuggingFaceClientConstructor {
|
|
21529
|
+
new (...args: unknown[]): HuggingFaceClient;
|
|
21530
|
+
}
|
|
21531
|
+
interface HuggingFaceModule {
|
|
21532
|
+
InferenceClient?: HuggingFaceClientConstructor;
|
|
21533
|
+
InferenceClientEndpoint?: HuggingFaceClientConstructor;
|
|
21534
|
+
HfInference?: HuggingFaceClientConstructor;
|
|
21535
|
+
HfInferenceEndpoint?: HuggingFaceClientConstructor;
|
|
21536
|
+
chatCompletion?: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceChatCompletion>;
|
|
21537
|
+
chatCompletionStream?: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceChatCompletionChunk>;
|
|
21538
|
+
textGeneration?: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceTextGenerationOutput>;
|
|
21539
|
+
textGenerationStream?: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceTextGenerationStreamOutput>;
|
|
21540
|
+
featureExtraction?: (params: HuggingFaceFeatureExtractionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceFeatureExtractionOutput>;
|
|
21541
|
+
[key: string]: unknown;
|
|
21542
|
+
}
|
|
21543
|
+
interface HuggingFaceClient {
|
|
21544
|
+
chatCompletion: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceChatCompletion>;
|
|
21545
|
+
chatCompletionStream: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceChatCompletionChunk>;
|
|
21546
|
+
textGeneration: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceTextGenerationOutput>;
|
|
21547
|
+
textGenerationStream: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceTextGenerationStreamOutput>;
|
|
21548
|
+
featureExtraction: (params: HuggingFaceFeatureExtractionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceFeatureExtractionOutput>;
|
|
21549
|
+
endpoint?: (endpointUrl: string) => HuggingFaceClient;
|
|
21550
|
+
[key: string]: unknown;
|
|
21551
|
+
}
|
|
21552
|
+
interface HuggingFaceChatCompletionParams {
|
|
21553
|
+
messages?: unknown;
|
|
21554
|
+
model?: string;
|
|
21555
|
+
provider?: string;
|
|
21556
|
+
endpointUrl?: string;
|
|
21557
|
+
stream?: boolean;
|
|
21558
|
+
[key: string]: unknown;
|
|
21559
|
+
}
|
|
21560
|
+
interface HuggingFaceTextGenerationParams {
|
|
21561
|
+
inputs?: unknown;
|
|
21562
|
+
model?: string;
|
|
21563
|
+
provider?: string;
|
|
21564
|
+
endpointUrl?: string;
|
|
21565
|
+
stream?: boolean;
|
|
21566
|
+
parameters?: Record<string, unknown>;
|
|
21567
|
+
[key: string]: unknown;
|
|
21568
|
+
}
|
|
21569
|
+
interface HuggingFaceFeatureExtractionParams {
|
|
21570
|
+
inputs?: unknown;
|
|
21571
|
+
model?: string;
|
|
21572
|
+
provider?: string;
|
|
21573
|
+
endpointUrl?: string;
|
|
21574
|
+
dimensions?: number | null;
|
|
21575
|
+
encoding_format?: "float" | "base64";
|
|
21576
|
+
[key: string]: unknown;
|
|
21577
|
+
}
|
|
21578
|
+
interface HuggingFaceUsage {
|
|
21579
|
+
prompt_tokens?: number;
|
|
21580
|
+
completion_tokens?: number;
|
|
21581
|
+
total_tokens?: number;
|
|
21582
|
+
[key: string]: unknown;
|
|
21583
|
+
}
|
|
21584
|
+
interface HuggingFaceChatMessage {
|
|
21585
|
+
role?: string;
|
|
21586
|
+
content?: string | null | unknown[];
|
|
21587
|
+
tool_calls?: unknown;
|
|
21588
|
+
[key: string]: unknown;
|
|
21589
|
+
}
|
|
21590
|
+
interface HuggingFaceChatCompletionChoice {
|
|
21591
|
+
index?: number;
|
|
21592
|
+
message?: HuggingFaceChatMessage;
|
|
21593
|
+
delta?: HuggingFaceChatMessage;
|
|
21594
|
+
finish_reason?: string | null;
|
|
21595
|
+
[key: string]: unknown;
|
|
21596
|
+
}
|
|
21597
|
+
interface HuggingFaceChatCompletion {
|
|
21598
|
+
id?: string;
|
|
21599
|
+
object?: string;
|
|
21600
|
+
model?: string;
|
|
21601
|
+
created?: number;
|
|
21602
|
+
usage?: HuggingFaceUsage;
|
|
21603
|
+
choices?: HuggingFaceChatCompletionChoice[];
|
|
21604
|
+
[key: string]: unknown;
|
|
21605
|
+
}
|
|
21606
|
+
type HuggingFaceChatCompletionChunk = HuggingFaceChatCompletion;
|
|
21607
|
+
interface HuggingFaceTextGenerationToken {
|
|
21608
|
+
id?: number;
|
|
21609
|
+
text?: string;
|
|
21610
|
+
logprob?: number;
|
|
21611
|
+
special?: boolean;
|
|
21612
|
+
[key: string]: unknown;
|
|
21613
|
+
}
|
|
21614
|
+
interface HuggingFaceTextGenerationDetails {
|
|
21615
|
+
finish_reason?: string | null;
|
|
21616
|
+
generated_tokens?: number;
|
|
21617
|
+
prefill?: HuggingFaceTextGenerationToken[];
|
|
21618
|
+
tokens?: HuggingFaceTextGenerationToken[];
|
|
21619
|
+
[key: string]: unknown;
|
|
21620
|
+
}
|
|
21621
|
+
interface HuggingFaceTextGenerationOutput {
|
|
21622
|
+
generated_text?: string | null;
|
|
21623
|
+
details?: HuggingFaceTextGenerationDetails | null;
|
|
21624
|
+
[key: string]: unknown;
|
|
21625
|
+
}
|
|
21626
|
+
interface HuggingFaceTextGenerationChoice {
|
|
21627
|
+
index?: number;
|
|
21628
|
+
text?: string;
|
|
21629
|
+
finish_reason?: string | null;
|
|
21630
|
+
[key: string]: unknown;
|
|
21631
|
+
}
|
|
21632
|
+
interface HuggingFaceTextGenerationStreamOutput {
|
|
21633
|
+
index?: number;
|
|
21634
|
+
token?: HuggingFaceTextGenerationToken;
|
|
21635
|
+
choices?: HuggingFaceTextGenerationChoice[];
|
|
21636
|
+
generated_text?: string | null;
|
|
21637
|
+
details?: HuggingFaceTextGenerationDetails | null;
|
|
21638
|
+
usage?: HuggingFaceUsage;
|
|
21639
|
+
model?: string;
|
|
21640
|
+
object?: string;
|
|
21641
|
+
created?: number;
|
|
21642
|
+
[key: string]: unknown;
|
|
21643
|
+
}
|
|
21644
|
+
type HuggingFaceFeatureExtractionOutput = number[] | number[][] | number[][][];
|
|
21645
|
+
|
|
21646
|
+
/**
|
|
21647
|
+
* Wrap a HuggingFace Inference SDK module or client with Braintrust tracing.
|
|
21648
|
+
*
|
|
21649
|
+
* Supports the LLM and embeddings APIs we intentionally instrument:
|
|
21650
|
+
* - chatCompletion
|
|
21651
|
+
* - chatCompletionStream
|
|
21652
|
+
* - textGeneration
|
|
21653
|
+
* - textGenerationStream
|
|
21654
|
+
* - featureExtraction
|
|
21655
|
+
*/
|
|
21656
|
+
declare function wrapHuggingFace(huggingFace: HuggingFaceModule): HuggingFaceModule;
|
|
21657
|
+
declare function wrapHuggingFace(huggingFace: HuggingFaceClient): HuggingFaceClient;
|
|
21658
|
+
declare function wrapHuggingFace<T>(huggingFace: T): T;
|
|
21659
|
+
|
|
21282
21660
|
/**
|
|
21283
21661
|
* Wrap an @openrouter/agent OpenRouter client so callModel() emits
|
|
21284
21662
|
* diagnostics-channel events consumed by the OpenRouter Agent plugin.
|
|
@@ -21296,6 +21674,17 @@ declare function wrapOpenRouter<T>(openrouter: T): T;
|
|
|
21296
21674
|
*/
|
|
21297
21675
|
declare function wrapMistral<T>(mistral: T): T;
|
|
21298
21676
|
|
|
21677
|
+
/**
|
|
21678
|
+
* Wrap a Cohere client so method calls emit diagnostics-channel events that
|
|
21679
|
+
* Braintrust plugins can consume.
|
|
21680
|
+
*/
|
|
21681
|
+
declare function wrapCohere<T>(cohere: T): T;
|
|
21682
|
+
|
|
21683
|
+
/**
|
|
21684
|
+
* Wrap a Groq client (created with `new Groq(...)`) with Braintrust tracing.
|
|
21685
|
+
*/
|
|
21686
|
+
declare function wrapGroq<T extends object>(groq: T): T;
|
|
21687
|
+
|
|
21299
21688
|
type ScorerFunction<Output = unknown> = (args: {
|
|
21300
21689
|
output: Output;
|
|
21301
21690
|
expected?: unknown;
|
|
@@ -32438,6 +32827,13 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32438
32827
|
}, {
|
|
32439
32828
|
name: string;
|
|
32440
32829
|
}>, "many">>;
|
|
32830
|
+
classifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32831
|
+
name: z.ZodString;
|
|
32832
|
+
}, "strip", z.ZodTypeAny, {
|
|
32833
|
+
name: string;
|
|
32834
|
+
}, {
|
|
32835
|
+
name: string;
|
|
32836
|
+
}>, "many">>;
|
|
32441
32837
|
}, "strip", z.ZodTypeAny, {
|
|
32442
32838
|
parameters?: Record<string, {
|
|
32443
32839
|
type: "prompt";
|
|
@@ -32986,6 +33382,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32986
33382
|
scores?: {
|
|
32987
33383
|
name: string;
|
|
32988
33384
|
}[] | undefined;
|
|
33385
|
+
classifiers?: {
|
|
33386
|
+
name: string;
|
|
33387
|
+
}[] | undefined;
|
|
32989
33388
|
}, {
|
|
32990
33389
|
parameters?: Record<string, {
|
|
32991
33390
|
type: "prompt";
|
|
@@ -33534,6 +33933,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
33534
33933
|
scores?: {
|
|
33535
33934
|
name: string;
|
|
33536
33935
|
}[] | undefined;
|
|
33936
|
+
classifiers?: {
|
|
33937
|
+
name: string;
|
|
33938
|
+
}[] | undefined;
|
|
33537
33939
|
}>;
|
|
33538
33940
|
type EvaluatorDefinition = z.infer<typeof evaluatorDefinitionSchema>;
|
|
33539
33941
|
declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -38792,6 +39194,13 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
38792
39194
|
}, {
|
|
38793
39195
|
name: string;
|
|
38794
39196
|
}>, "many">>;
|
|
39197
|
+
classifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39198
|
+
name: z.ZodString;
|
|
39199
|
+
}, "strip", z.ZodTypeAny, {
|
|
39200
|
+
name: string;
|
|
39201
|
+
}, {
|
|
39202
|
+
name: string;
|
|
39203
|
+
}>, "many">>;
|
|
38795
39204
|
}, "strip", z.ZodTypeAny, {
|
|
38796
39205
|
parameters?: Record<string, {
|
|
38797
39206
|
type: "prompt";
|
|
@@ -39340,6 +39749,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39340
39749
|
scores?: {
|
|
39341
39750
|
name: string;
|
|
39342
39751
|
}[] | undefined;
|
|
39752
|
+
classifiers?: {
|
|
39753
|
+
name: string;
|
|
39754
|
+
}[] | undefined;
|
|
39343
39755
|
}, {
|
|
39344
39756
|
parameters?: Record<string, {
|
|
39345
39757
|
type: "prompt";
|
|
@@ -39888,6 +40300,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39888
40300
|
scores?: {
|
|
39889
40301
|
name: string;
|
|
39890
40302
|
}[] | undefined;
|
|
40303
|
+
classifiers?: {
|
|
40304
|
+
name: string;
|
|
40305
|
+
}[] | undefined;
|
|
39891
40306
|
}>>;
|
|
39892
40307
|
type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
|
|
39893
40308
|
|
|
@@ -40178,17 +40593,23 @@ type EvalScorerArgs<Input, Output, Expected, Metadata extends BaseMetadata = Def
|
|
|
40178
40593
|
};
|
|
40179
40594
|
type OneOrMoreScores = Score | number | null | Array<Score>;
|
|
40180
40595
|
type EvalScorer<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = (args: EvalScorerArgs<Input, Output, Expected, Metadata>) => OneOrMoreScores | Promise<OneOrMoreScores>;
|
|
40596
|
+
type OneOrMoreClassifications = Classification | Classification[] | null;
|
|
40597
|
+
type EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = (args: EvalScorerArgs<Input, Output, Expected, Metadata>) => OneOrMoreClassifications | Promise<OneOrMoreClassifications>;
|
|
40181
40598
|
type EvalResult<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalCase<Input, Expected, Metadata> & {
|
|
40182
40599
|
output: Output;
|
|
40183
|
-
scores: Record<string, number | null>;
|
|
40184
40600
|
error: unknown;
|
|
40185
40601
|
origin?: ObjectReferenceType;
|
|
40602
|
+
scores: Record<string, number | null>;
|
|
40603
|
+
classifications?: Record<string, ClassificationItem[]>;
|
|
40186
40604
|
};
|
|
40187
40605
|
type ErrorScoreHandler = (args: {
|
|
40188
40606
|
rootSpan: Span;
|
|
40189
40607
|
data: EvalCase<any, any, any>;
|
|
40190
40608
|
unhandledScores: string[];
|
|
40191
40609
|
}) => Record<string, number> | undefined | void;
|
|
40610
|
+
/**
|
|
40611
|
+
* Defines an evaluator. At least one of `scores` or `classifiers` must be provided.
|
|
40612
|
+
*/
|
|
40192
40613
|
interface Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> {
|
|
40193
40614
|
/**
|
|
40194
40615
|
* A function that returns a list of inputs, expected outputs, and metadata.
|
|
@@ -40199,9 +40620,16 @@ interface Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = Def
|
|
|
40199
40620
|
*/
|
|
40200
40621
|
task: EvalTask<Input, Output, Expected, Metadata, Parameters>;
|
|
40201
40622
|
/**
|
|
40202
|
-
* A set of functions that take an input, output, and expected value and return a
|
|
40623
|
+
* A set of functions that take an input, output, and expected value and return a {@link Score}.
|
|
40624
|
+
* At least one of `scores` or `classifiers` must be provided.
|
|
40625
|
+
*/
|
|
40626
|
+
scores?: EvalScorer<Input, Output, Expected, Metadata>[];
|
|
40627
|
+
/**
|
|
40628
|
+
* A set of functions that take an input, output, and expected value and return a
|
|
40629
|
+
* {@link Classification}. Results are recorded under the `classifications` column.
|
|
40630
|
+
* At least one of `scores` or `classifiers` must be provided.
|
|
40203
40631
|
*/
|
|
40204
|
-
|
|
40632
|
+
classifiers?: EvalClassifier<Input, Output, Expected, Metadata>[];
|
|
40205
40633
|
/**
|
|
40206
40634
|
* A set of parameters that will be passed to the evaluator.
|
|
40207
40635
|
* Can be:
|
|
@@ -40450,10 +40878,14 @@ interface InstrumentationConfig {
|
|
|
40450
40878
|
vercel?: boolean;
|
|
40451
40879
|
aisdk?: boolean;
|
|
40452
40880
|
google?: boolean;
|
|
40881
|
+
huggingface?: boolean;
|
|
40453
40882
|
claudeAgentSDK?: boolean;
|
|
40883
|
+
cursor?: boolean;
|
|
40884
|
+
cursorSDK?: boolean;
|
|
40454
40885
|
openrouter?: boolean;
|
|
40455
40886
|
openrouterAgent?: boolean;
|
|
40456
40887
|
mistral?: boolean;
|
|
40888
|
+
cohere?: boolean;
|
|
40457
40889
|
};
|
|
40458
40890
|
}
|
|
40459
40891
|
/**
|
|
@@ -40525,6 +40957,8 @@ type exports_DataSummary = DataSummary;
|
|
|
40525
40957
|
type exports_Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = Dataset<IsLegacyDataset>;
|
|
40526
40958
|
declare const exports_Dataset: typeof Dataset;
|
|
40527
40959
|
type exports_DatasetRecord<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = DatasetRecord<IsLegacyDataset>;
|
|
40960
|
+
type exports_DatasetRestorePreviewResult = DatasetRestorePreviewResult;
|
|
40961
|
+
type exports_DatasetRestoreResult = DatasetRestoreResult;
|
|
40528
40962
|
type exports_DatasetSummary = DatasetSummary;
|
|
40529
40963
|
type exports_DefaultMetadataType = DefaultMetadataType;
|
|
40530
40964
|
type exports_DefaultPromptArgs = DefaultPromptArgs;
|
|
@@ -40532,6 +40966,7 @@ declare const exports_ERR_PERMALINK: typeof ERR_PERMALINK;
|
|
|
40532
40966
|
type exports_EndSpanArgs = EndSpanArgs;
|
|
40533
40967
|
declare const exports_Eval: typeof Eval;
|
|
40534
40968
|
type exports_EvalCase<Input, Expected, Metadata> = EvalCase<Input, Expected, Metadata>;
|
|
40969
|
+
type exports_EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalClassifier<Input, Output, Expected, Metadata>;
|
|
40535
40970
|
type exports_EvalHooks<Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> = EvalHooks<Expected, Metadata, Parameters>;
|
|
40536
40971
|
type exports_EvalParameterSerializedSchema = EvalParameterSerializedSchema;
|
|
40537
40972
|
type exports_EvalParameters = EvalParameters;
|
|
@@ -40729,7 +41164,12 @@ declare const exports_wrapAISDKModel: typeof wrapAISDKModel;
|
|
|
40729
41164
|
declare const exports_wrapAgentClass: typeof wrapAgentClass;
|
|
40730
41165
|
declare const exports_wrapAnthropic: typeof wrapAnthropic;
|
|
40731
41166
|
declare const exports_wrapClaudeAgentSDK: typeof wrapClaudeAgentSDK;
|
|
41167
|
+
declare const exports_wrapCohere: typeof wrapCohere;
|
|
41168
|
+
declare const exports_wrapCursorSDK: typeof wrapCursorSDK;
|
|
41169
|
+
declare const exports_wrapGoogleADK: typeof wrapGoogleADK;
|
|
40732
41170
|
declare const exports_wrapGoogleGenAI: typeof wrapGoogleGenAI;
|
|
41171
|
+
declare const exports_wrapGroq: typeof wrapGroq;
|
|
41172
|
+
declare const exports_wrapHuggingFace: typeof wrapHuggingFace;
|
|
40733
41173
|
declare const exports_wrapMastraAgent: typeof wrapMastraAgent;
|
|
40734
41174
|
declare const exports_wrapMistral: typeof wrapMistral;
|
|
40735
41175
|
declare const exports_wrapOpenAI: typeof wrapOpenAI;
|
|
@@ -40739,7 +41179,7 @@ declare const exports_wrapOpenRouterAgent: typeof wrapOpenRouterAgent;
|
|
|
40739
41179
|
declare const exports_wrapTraced: typeof wrapTraced;
|
|
40740
41180
|
declare const exports_wrapVitest: typeof wrapVitest;
|
|
40741
41181
|
declare namespace exports {
|
|
40742
|
-
export { type exports_AnyDataset as AnyDataset, exports_Attachment as Attachment, type exports_AttachmentParams as AttachmentParams, exports_AttachmentReference as AttachmentReference, exports_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, type exports_BackgroundLoggerOpts as BackgroundLoggerOpts, exports_BaseAttachment as BaseAttachment, exports_BaseExperiment as BaseExperiment, type exports_BaseMetadata as BaseMetadata, exports_BraintrustMiddleware as BraintrustMiddleware, exports_BraintrustState as BraintrustState, exports_BraintrustStream as BraintrustStream, type exports_BraintrustStreamChunk as BraintrustStreamChunk, exports_CachedSpanFetcher as CachedSpanFetcher, type exports_ChatPrompt as ChatPrompt, exports_CodeFunction as CodeFunction, type exports_CodeOpts as CodeOpts, exports_CodePrompt as CodePrompt, type exports_CommentEvent as CommentEvent, type exports_CompiledPrompt as CompiledPrompt, type exports_CompiledPromptParams as CompiledPromptParams, type exports_CompletionPrompt as CompletionPrompt, exports_ContextManager as ContextManager, type exports_ContextParentSpanIds as ContextParentSpanIds, type exports_CreateProjectOpts as CreateProjectOpts, type exports_CurrentSpanStore as CurrentSpanStore, exports_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports_DataSummary as DataSummary, exports_Dataset as Dataset, type exports_DatasetRecord as DatasetRecord, type exports_DatasetSummary as DatasetSummary, type exports_DefaultMetadataType as DefaultMetadataType, type exports_DefaultPromptArgs as DefaultPromptArgs, exports_ERR_PERMALINK as ERR_PERMALINK, type exports_EndSpanArgs as EndSpanArgs, exports_Eval as Eval, type exports_EvalCase as EvalCase, type exports_EvalHooks as EvalHooks, type exports_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports_EvalParameters as EvalParameters, type exports_EvalResult as EvalResult, exports_EvalResultWithSummary as EvalResultWithSummary, type exports_EvalScorer as EvalScorer, type exports_EvalScorerArgs as EvalScorerArgs, type exports_EvalTask as EvalTask, type exports_Evaluator as Evaluator, type exports_EvaluatorDef as EvaluatorDef, type exports_EvaluatorDefinition as EvaluatorDefinition, type exports_EvaluatorDefinitions as EvaluatorDefinitions, type exports_EvaluatorFile as EvaluatorFile, type exports_EvaluatorManifest as EvaluatorManifest, exports_Experiment as Experiment, type exports_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports_ExperimentSummary as ExperimentSummary, type exports_Exportable as Exportable, exports_ExternalAttachment as ExternalAttachment, type exports_ExternalAttachmentParams as ExternalAttachmentParams, exports_FailedHTTPResponse as FailedHTTPResponse, type exports_FullInitDatasetOptions as FullInitDatasetOptions, type exports_FullInitOptions as FullInitOptions, type exports_FullLoginOptions as FullLoginOptions, type exports_FunctionEvent as FunctionEvent, type exports_GetThreadOptions as GetThreadOptions, exports_IDGenerator as IDGenerator, type exports_IdField as IdField, type exports_InitDatasetOptions as InitDatasetOptions, type exports_InitLoggerOptions as InitLoggerOptions, type exports_InitOptions as InitOptions, type exports_InputField as InputField, type exports_InstrumentationConfig as InstrumentationConfig, type exports_InvokeFunctionArgs as InvokeFunctionArgs, type exports_InvokeReturn as InvokeReturn, exports_JSONAttachment as JSONAttachment, exports_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, exports_LazyValue as LazyValue, type exports_LoadPromptOptions as LoadPromptOptions, type exports_LogCommentFullArgs as LogCommentFullArgs, type exports_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports_LogOptions as LogOptions, exports_Logger as Logger, exports_LoginInvalidOrgError as LoginInvalidOrgError, type exports_LoginOptions as LoginOptions, type exports_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports_Logs3OverflowUpload as Logs3OverflowUpload, type exports_MetricSummary as MetricSummary, exports_NOOP_SPAN as NOOP_SPAN, exports_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports_NoopSpan as NoopSpan, exports_ObjectFetcher as ObjectFetcher, type exports_ObjectMetadata as ObjectMetadata, type exports_OtherExperimentLogFields as OtherExperimentLogFields, type exports_ParametersSource as ParametersSource, type exports_ParentExperimentIds as ParentExperimentIds, type exports_ParentProjectLogIds as ParentProjectLogIds, exports_Project as Project, exports_ProjectNameIdMap as ProjectNameIdMap, type exports_PromiseUnless as PromiseUnless, exports_Prompt as Prompt, exports_PromptBuilder as PromptBuilder, type exports_PromptContents as PromptContents, type exports_PromptDefinition as PromptDefinition, type exports_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports_PromptOpts as PromptOpts, type exports_PromptRowWithId as PromptRowWithId, exports_ReadonlyAttachment as ReadonlyAttachment, exports_ReadonlyExperiment as ReadonlyExperiment, type exports_RegisterSandboxOptions as RegisterSandboxOptions, type exports_RegisterSandboxResult as RegisterSandboxResult, exports_Reporter as Reporter, type exports_ReporterBody as ReporterBody, type exports_SandboxConfig as SandboxConfig, type exports_ScoreSummary as ScoreSummary, exports_ScorerBuilder as ScorerBuilder, type exports_ScorerOpts as ScorerOpts, type exports_SerializedBraintrustState as SerializedBraintrustState, type exports_SetCurrentArg as SetCurrentArg, type exports_Span as Span, type exports_SpanContext as SpanContext, type exports_SpanData as SpanData, exports_SpanFetcher as SpanFetcher, exports_SpanImpl as SpanImpl, type exports_StartSpanArgs as StartSpanArgs, type exports_TemplateFormat as TemplateFormat, type exports_TemplateRenderer as TemplateRenderer, type exports_TemplateRendererPlugin as TemplateRendererPlugin, exports_TestBackgroundLogger as TestBackgroundLogger, exports_ToolBuilder as ToolBuilder, type exports_Trace as Trace, exports_UUIDGenerator as UUIDGenerator, type exports_WithTransactionId as WithTransactionId, exports_X_CACHED_HEADER as X_CACHED_HEADER, exports__exportsForTestingOnly as _exportsForTestingOnly, exports__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports__internalSetInitialState as _internalSetInitialState, exports_addAzureBlobHeaders as addAzureBlobHeaders, exports_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports_buildLocalSummary as buildLocalSummary, exports_configureInstrumentation as configureInstrumentation, exports_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports_currentExperiment as currentExperiment, exports_currentLogger as currentLogger, exports_currentSpan as currentSpan, exports_deepCopyEvent as deepCopyEvent, exports_defaultErrorScoreHandler as defaultErrorScoreHandler, exports_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports_devNullWritableStream as devNullWritableStream, exports_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports_flush as flush, exports_getContextManager as getContextManager, exports_getIdGenerator as getIdGenerator, exports_getPromptVersions as getPromptVersions, exports_getSpanParentObject as getSpanParentObject, exports_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports_init as init, exports_initDataset as initDataset, exports_initExperiment as initExperiment, exports_initFunction as initFunction, exports_initLogger as initLogger, exports_initNodeTestSuite as initNodeTestSuite, exports_invoke as invoke, exports_isTemplateFormat as isTemplateFormat, exports_loadParameters as loadParameters, exports_loadPrompt as loadPrompt, exports_log as log, exports_logError as logError, exports_login as login, exports_loginToState as loginToState, exports_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports_newId as newId, exports_parseCachedHeader as parseCachedHeader, exports_parseTemplateFormat as parseTemplateFormat, exports_permalink as permalink, exports_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports_projects as projects, exports_promptContentsSchema as promptContentsSchema, exports_promptDefinitionSchema as promptDefinitionSchema, exports_promptDefinitionToPromptData as promptDefinitionToPromptData, exports_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports_registerOtelFlush as registerOtelFlush, exports_registerSandbox as registerSandbox, exports_registerTemplatePlugin as registerTemplatePlugin, exports_renderMessage as renderMessage, exports_renderPromptParams as renderPromptParams, exports_renderTemplateContent as renderTemplateContent, exports_reportFailures as reportFailures, exports_runEvaluator as runEvaluator, exports_setFetch as setFetch, exports_setMaskingFunction as setMaskingFunction, exports_spanComponentsToObjectId as spanComponentsToObjectId, exports_startSpan as startSpan, exports_summarize as summarize, exports_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports_traceable as traceable, exports_traced as traced, exports_updateSpan as updateSpan, exports_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports_utf8ByteLength as utf8ByteLength, exports_withCurrent as withCurrent, exports_withDataset as withDataset, exports_withExperiment as withExperiment, exports_withLogger as withLogger, exports_withParent as withParent, exports_wrapAISDK as wrapAISDK, exports_wrapAISDKModel as wrapAISDKModel, exports_wrapAgentClass as wrapAgentClass, exports_wrapAnthropic as wrapAnthropic, exports_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports_wrapGoogleGenAI as wrapGoogleGenAI, exports_wrapMastraAgent as wrapMastraAgent, exports_wrapMistral as wrapMistral, exports_wrapOpenAI as wrapOpenAI, exports_wrapOpenAIv4 as wrapOpenAIv4, exports_wrapOpenRouter as wrapOpenRouter, exports_wrapOpenRouterAgent as wrapOpenRouterAgent, exports_wrapTraced as wrapTraced, exports_wrapVitest as wrapVitest };
|
|
41182
|
+
export { type exports_AnyDataset as AnyDataset, exports_Attachment as Attachment, type exports_AttachmentParams as AttachmentParams, exports_AttachmentReference as AttachmentReference, exports_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, type exports_BackgroundLoggerOpts as BackgroundLoggerOpts, exports_BaseAttachment as BaseAttachment, exports_BaseExperiment as BaseExperiment, type exports_BaseMetadata as BaseMetadata, exports_BraintrustMiddleware as BraintrustMiddleware, exports_BraintrustState as BraintrustState, exports_BraintrustStream as BraintrustStream, type exports_BraintrustStreamChunk as BraintrustStreamChunk, exports_CachedSpanFetcher as CachedSpanFetcher, type exports_ChatPrompt as ChatPrompt, exports_CodeFunction as CodeFunction, type exports_CodeOpts as CodeOpts, exports_CodePrompt as CodePrompt, type exports_CommentEvent as CommentEvent, type exports_CompiledPrompt as CompiledPrompt, type exports_CompiledPromptParams as CompiledPromptParams, type exports_CompletionPrompt as CompletionPrompt, exports_ContextManager as ContextManager, type exports_ContextParentSpanIds as ContextParentSpanIds, type exports_CreateProjectOpts as CreateProjectOpts, type exports_CurrentSpanStore as CurrentSpanStore, exports_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports_DataSummary as DataSummary, exports_Dataset as Dataset, type exports_DatasetRecord as DatasetRecord, type exports_DatasetRestorePreviewResult as DatasetRestorePreviewResult, type exports_DatasetRestoreResult as DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type exports_DatasetSummary as DatasetSummary, type exports_DefaultMetadataType as DefaultMetadataType, type exports_DefaultPromptArgs as DefaultPromptArgs, exports_ERR_PERMALINK as ERR_PERMALINK, type exports_EndSpanArgs as EndSpanArgs, exports_Eval as Eval, type exports_EvalCase as EvalCase, type exports_EvalClassifier as EvalClassifier, type exports_EvalHooks as EvalHooks, type exports_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports_EvalParameters as EvalParameters, type exports_EvalResult as EvalResult, exports_EvalResultWithSummary as EvalResultWithSummary, type exports_EvalScorer as EvalScorer, type exports_EvalScorerArgs as EvalScorerArgs, type exports_EvalTask as EvalTask, type exports_Evaluator as Evaluator, type exports_EvaluatorDef as EvaluatorDef, type exports_EvaluatorDefinition as EvaluatorDefinition, type exports_EvaluatorDefinitions as EvaluatorDefinitions, type exports_EvaluatorFile as EvaluatorFile, type exports_EvaluatorManifest as EvaluatorManifest, exports_Experiment as Experiment, type exports_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports_ExperimentSummary as ExperimentSummary, type exports_Exportable as Exportable, exports_ExternalAttachment as ExternalAttachment, type exports_ExternalAttachmentParams as ExternalAttachmentParams, exports_FailedHTTPResponse as FailedHTTPResponse, type exports_FullInitDatasetOptions as FullInitDatasetOptions, type exports_FullInitOptions as FullInitOptions, type exports_FullLoginOptions as FullLoginOptions, type exports_FunctionEvent as FunctionEvent, type exports_GetThreadOptions as GetThreadOptions, exports_IDGenerator as IDGenerator, type exports_IdField as IdField, type exports_InitDatasetOptions as InitDatasetOptions, type exports_InitLoggerOptions as InitLoggerOptions, type exports_InitOptions as InitOptions, type exports_InputField as InputField, type exports_InstrumentationConfig as InstrumentationConfig, type exports_InvokeFunctionArgs as InvokeFunctionArgs, type exports_InvokeReturn as InvokeReturn, exports_JSONAttachment as JSONAttachment, exports_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, exports_LazyValue as LazyValue, type exports_LoadPromptOptions as LoadPromptOptions, type exports_LogCommentFullArgs as LogCommentFullArgs, type exports_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports_LogOptions as LogOptions, exports_Logger as Logger, exports_LoginInvalidOrgError as LoginInvalidOrgError, type exports_LoginOptions as LoginOptions, type exports_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports_Logs3OverflowUpload as Logs3OverflowUpload, type exports_MetricSummary as MetricSummary, exports_NOOP_SPAN as NOOP_SPAN, exports_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports_NoopSpan as NoopSpan, exports_ObjectFetcher as ObjectFetcher, type exports_ObjectMetadata as ObjectMetadata, type exports_OtherExperimentLogFields as OtherExperimentLogFields, type exports_ParametersSource as ParametersSource, type exports_ParentExperimentIds as ParentExperimentIds, type exports_ParentProjectLogIds as ParentProjectLogIds, exports_Project as Project, exports_ProjectNameIdMap as ProjectNameIdMap, type exports_PromiseUnless as PromiseUnless, exports_Prompt as Prompt, exports_PromptBuilder as PromptBuilder, type exports_PromptContents as PromptContents, type exports_PromptDefinition as PromptDefinition, type exports_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports_PromptOpts as PromptOpts, type exports_PromptRowWithId as PromptRowWithId, exports_ReadonlyAttachment as ReadonlyAttachment, exports_ReadonlyExperiment as ReadonlyExperiment, type exports_RegisterSandboxOptions as RegisterSandboxOptions, type exports_RegisterSandboxResult as RegisterSandboxResult, exports_Reporter as Reporter, type exports_ReporterBody as ReporterBody, type exports_SandboxConfig as SandboxConfig, type exports_ScoreSummary as ScoreSummary, exports_ScorerBuilder as ScorerBuilder, type exports_ScorerOpts as ScorerOpts, type exports_SerializedBraintrustState as SerializedBraintrustState, type exports_SetCurrentArg as SetCurrentArg, type exports_Span as Span, type exports_SpanContext as SpanContext, type exports_SpanData as SpanData, exports_SpanFetcher as SpanFetcher, exports_SpanImpl as SpanImpl, type exports_StartSpanArgs as StartSpanArgs, type exports_TemplateFormat as TemplateFormat, type exports_TemplateRenderer as TemplateRenderer, type exports_TemplateRendererPlugin as TemplateRendererPlugin, exports_TestBackgroundLogger as TestBackgroundLogger, exports_ToolBuilder as ToolBuilder, type exports_Trace as Trace, exports_UUIDGenerator as UUIDGenerator, type exports_WithTransactionId as WithTransactionId, exports_X_CACHED_HEADER as X_CACHED_HEADER, exports__exportsForTestingOnly as _exportsForTestingOnly, exports__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports__internalSetInitialState as _internalSetInitialState, exports_addAzureBlobHeaders as addAzureBlobHeaders, exports_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports_buildLocalSummary as buildLocalSummary, exports_configureInstrumentation as configureInstrumentation, exports_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports_currentExperiment as currentExperiment, exports_currentLogger as currentLogger, exports_currentSpan as currentSpan, exports_deepCopyEvent as deepCopyEvent, exports_defaultErrorScoreHandler as defaultErrorScoreHandler, exports_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports_devNullWritableStream as devNullWritableStream, exports_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports_flush as flush, exports_getContextManager as getContextManager, exports_getIdGenerator as getIdGenerator, exports_getPromptVersions as getPromptVersions, exports_getSpanParentObject as getSpanParentObject, exports_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports_init as init, exports_initDataset as initDataset, exports_initExperiment as initExperiment, exports_initFunction as initFunction, exports_initLogger as initLogger, exports_initNodeTestSuite as initNodeTestSuite, exports_invoke as invoke, exports_isTemplateFormat as isTemplateFormat, exports_loadParameters as loadParameters, exports_loadPrompt as loadPrompt, exports_log as log, exports_logError as logError, exports_login as login, exports_loginToState as loginToState, exports_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports_newId as newId, exports_parseCachedHeader as parseCachedHeader, exports_parseTemplateFormat as parseTemplateFormat, exports_permalink as permalink, exports_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports_projects as projects, exports_promptContentsSchema as promptContentsSchema, exports_promptDefinitionSchema as promptDefinitionSchema, exports_promptDefinitionToPromptData as promptDefinitionToPromptData, exports_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports_registerOtelFlush as registerOtelFlush, exports_registerSandbox as registerSandbox, exports_registerTemplatePlugin as registerTemplatePlugin, exports_renderMessage as renderMessage, exports_renderPromptParams as renderPromptParams, exports_renderTemplateContent as renderTemplateContent, exports_reportFailures as reportFailures, exports_runEvaluator as runEvaluator, exports_setFetch as setFetch, exports_setMaskingFunction as setMaskingFunction, exports_spanComponentsToObjectId as spanComponentsToObjectId, exports_startSpan as startSpan, exports_summarize as summarize, exports_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports_traceable as traceable, exports_traced as traced, exports_updateSpan as updateSpan, exports_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports_utf8ByteLength as utf8ByteLength, exports_withCurrent as withCurrent, exports_withDataset as withDataset, exports_withExperiment as withExperiment, exports_withLogger as withLogger, exports_withParent as withParent, exports_wrapAISDK as wrapAISDK, exports_wrapAISDKModel as wrapAISDKModel, exports_wrapAgentClass as wrapAgentClass, exports_wrapAnthropic as wrapAnthropic, exports_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports_wrapCohere as wrapCohere, exports_wrapCursorSDK as wrapCursorSDK, exports_wrapGoogleADK as wrapGoogleADK, exports_wrapGoogleGenAI as wrapGoogleGenAI, exports_wrapGroq as wrapGroq, exports_wrapHuggingFace as wrapHuggingFace, exports_wrapMastraAgent as wrapMastraAgent, exports_wrapMistral as wrapMistral, exports_wrapOpenAI as wrapOpenAI, exports_wrapOpenAIv4 as wrapOpenAIv4, exports_wrapOpenRouter as wrapOpenRouter, exports_wrapOpenRouterAgent as wrapOpenRouterAgent, exports_wrapTraced as wrapTraced, exports_wrapVitest as wrapVitest };
|
|
40743
41183
|
}
|
|
40744
41184
|
|
|
40745
|
-
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustMiddleware, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, LazyValue, type LoadPromptOptions, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapGoogleGenAI, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
|
|
41185
|
+
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustMiddleware, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, type DatasetRecord, type DatasetRestorePreviewResult, type DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, LazyValue, type LoadPromptOptions, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapCohere, wrapCursorSDK, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
|