braintrust 3.12.0 → 3.13.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 +25 -6
- package/dev/dist/index.d.ts +25 -6
- package/dev/dist/index.js +134 -43
- package/dev/dist/index.mjs +113 -22
- package/dist/apply-auto-instrumentation.js +170 -170
- package/dist/apply-auto-instrumentation.mjs +1 -1
- package/dist/auto-instrumentations/bundler/esbuild.cjs +1 -0
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/next.cjs +1 -0
- package/dist/auto-instrumentations/bundler/next.mjs +3 -3
- package/dist/auto-instrumentations/bundler/rollup.cjs +1 -0
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +1 -0
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +1 -0
- package/dist/auto-instrumentations/bundler/webpack.cjs +1 -0
- package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
- package/dist/auto-instrumentations/{chunk-2DPA74KK.mjs → chunk-E5DUYJWK.mjs} +1 -0
- package/dist/auto-instrumentations/{chunk-73BZUKVI.mjs → chunk-GJOO4ESL.mjs} +1 -1
- package/dist/auto-instrumentations/{chunk-AFXRW7I7.mjs → chunk-WFEUJACP.mjs} +1 -1
- package/dist/auto-instrumentations/hook.mjs +1 -0
- package/dist/auto-instrumentations/index.cjs +1 -0
- package/dist/auto-instrumentations/index.mjs +1 -1
- package/dist/browser.d.mts +149 -21
- package/dist/browser.d.ts +149 -21
- package/dist/browser.js +114 -24
- package/dist/browser.mjs +114 -24
- package/dist/{chunk-BW4DF4CY.js → chunk-26JGOELH.js} +1 -0
- package/dist/{chunk-MSLBGITU.mjs → chunk-75IQCUB2.mjs} +1 -0
- package/dist/cli.js +121 -44
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +114 -24
- package/dist/edge-light.mjs +114 -24
- package/dist/index.d.mts +149 -21
- package/dist/index.d.ts +149 -21
- package/dist/index.js +529 -394
- package/dist/index.mjs +161 -26
- package/dist/instrumentation/index.d.mts +40 -3
- package/dist/instrumentation/index.d.ts +40 -3
- package/dist/instrumentation/index.js +15 -2
- package/dist/instrumentation/index.mjs +15 -2
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +114 -24
- package/dist/workerd.mjs +114 -24
- package/package.json +3 -17
- package/util/dist/index.d.mts +3 -1
- package/util/dist/index.d.ts +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -13504,7 +13504,7 @@ declare const ObjectReference$1: z.ZodObject<{
|
|
|
13504
13504
|
created?: string | null | undefined;
|
|
13505
13505
|
_xact_id?: string | null | undefined;
|
|
13506
13506
|
}>;
|
|
13507
|
-
type ObjectReferenceType = z.infer<typeof ObjectReference$1>;
|
|
13507
|
+
type ObjectReferenceType$1 = z.infer<typeof ObjectReference$1>;
|
|
13508
13508
|
declare const Prompt$1: z.ZodObject<{
|
|
13509
13509
|
id: z.ZodString;
|
|
13510
13510
|
_xact_id: z.ZodString;
|
|
@@ -16037,6 +16037,7 @@ interface Common {
|
|
|
16037
16037
|
getRepoInfo: (settings?: GitMetadataSettingsType) => Promise<RepoInfoType | undefined>;
|
|
16038
16038
|
getPastNAncestors: (n?: number, remote?: string) => Promise<string[]>;
|
|
16039
16039
|
getEnv: (name: string) => string | undefined;
|
|
16040
|
+
getBraintrustApiKey: () => Promise<string | undefined>;
|
|
16040
16041
|
getCallerLocation: () => CallerLocation | undefined;
|
|
16041
16042
|
newAsyncLocalStorage: <T>() => IsoAsyncLocalStorage<T>;
|
|
16042
16043
|
newTracingChannel: <M = any>(nameOrChannels: string | IsoTracingChannelCollection<M>) => IsoTracingChannel<M>;
|
|
@@ -16223,6 +16224,7 @@ declare const ObjectReference: z.ZodObject<{
|
|
|
16223
16224
|
created?: string | null | undefined;
|
|
16224
16225
|
_xact_id?: string | null | undefined;
|
|
16225
16226
|
}>;
|
|
16227
|
+
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
16226
16228
|
|
|
16227
16229
|
type IdField = {
|
|
16228
16230
|
id: string;
|
|
@@ -16243,7 +16245,7 @@ type OtherExperimentLogFields = {
|
|
|
16243
16245
|
metadata: Record<string, unknown>;
|
|
16244
16246
|
metrics: Record<string, unknown>;
|
|
16245
16247
|
datasetRecordId: string;
|
|
16246
|
-
origin:
|
|
16248
|
+
origin: ObjectReferenceType;
|
|
16247
16249
|
span_attributes: Record<string, unknown>;
|
|
16248
16250
|
[ASYNC_SCORING_CONTROL_FIELD]: AsyncScoringControlType;
|
|
16249
16251
|
[MERGE_PATHS_FIELD]: string[][];
|
|
@@ -16296,6 +16298,7 @@ type DatasetEvent = {
|
|
|
16296
16298
|
tags?: string[];
|
|
16297
16299
|
metadata?: unknown;
|
|
16298
16300
|
created?: string;
|
|
16301
|
+
origin?: ObjectReferenceType;
|
|
16299
16302
|
id: string;
|
|
16300
16303
|
dataset_id: string;
|
|
16301
16304
|
} & ({
|
|
@@ -16817,9 +16820,15 @@ declare class ParametersCache {
|
|
|
16817
16820
|
interface CachedSpan {
|
|
16818
16821
|
input?: unknown;
|
|
16819
16822
|
output?: unknown;
|
|
16823
|
+
expected?: unknown;
|
|
16824
|
+
error?: unknown;
|
|
16825
|
+
scores?: Record<string, unknown>;
|
|
16826
|
+
metrics?: Record<string, unknown>;
|
|
16820
16827
|
metadata?: Record<string, unknown>;
|
|
16828
|
+
tags?: string[];
|
|
16821
16829
|
span_id: string;
|
|
16822
16830
|
span_parents?: string[];
|
|
16831
|
+
is_root?: boolean | null;
|
|
16823
16832
|
span_attributes?: {
|
|
16824
16833
|
name?: string;
|
|
16825
16834
|
type?: string;
|
|
@@ -19182,6 +19191,13 @@ declare abstract class BaseAttachment {
|
|
|
19182
19191
|
abstract data(): Promise<Blob>;
|
|
19183
19192
|
abstract debugInfo(): Record<string, unknown>;
|
|
19184
19193
|
}
|
|
19194
|
+
type DatasetPipelineDeferredJSONAttachmentHook = (data: unknown, options?: {
|
|
19195
|
+
filename?: string;
|
|
19196
|
+
pretty?: boolean;
|
|
19197
|
+
}) => object;
|
|
19198
|
+
declare global {
|
|
19199
|
+
var __BT_DATASET_PIPELINE_DEFER_JSON_ATTACHMENT__: DatasetPipelineDeferredJSONAttachmentHook | undefined;
|
|
19200
|
+
}
|
|
19185
19201
|
/**
|
|
19186
19202
|
* Represents an attachment to be uploaded and the associated metadata.
|
|
19187
19203
|
* `Attachment` objects can be inserted anywhere in an event, allowing you to
|
|
@@ -19712,7 +19728,7 @@ type InitializedExperiment<IsOpen extends boolean | undefined> = IsOpen extends
|
|
|
19712
19728
|
* @param options.baseExperiment An optional experiment name to use as a base. If specified, the new experiment will be summarized and compared to this experiment. Otherwise, it will pick an experiment by finding the closest ancestor on the default (e.g. main) branch.
|
|
19713
19729
|
* @param options.isPublic An optional parameter to control whether the experiment is publicly visible to anybody with the link or privately visible to only members of the organization. Defaults to private.
|
|
19714
19730
|
* @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
|
|
19715
|
-
* @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.
|
|
19731
|
+
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
|
|
19716
19732
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
19717
19733
|
* @param options.metadata (Optional) A dictionary with additional data about the test example, model outputs, or just about anything else that's relevant, that you can use to help find and analyze examples later. For example, you could log the `prompt`, example's `id`, or anything else that would be useful to slice/dice later. The values in `metadata` can be any JSON-serializable type, but its keys must be strings.
|
|
19718
19734
|
* @param options.gitMetadataSettings (Optional) Settings for collecting git metadata. By default, Braintrust collects the git metadata fields allowed by your organization's git metadata settings. If those settings are absent, git metadata is not collected unless this option is set.
|
|
@@ -19774,7 +19790,7 @@ type FullInitDatasetOptions<IsLegacyDataset extends boolean> = {
|
|
|
19774
19790
|
* @param options.snapshotName Pin the dataset to the version captured by this named snapshot. If `environment` is also provided, `snapshotName` takes precedence.
|
|
19775
19791
|
* @param options.environment Pin the dataset to the version tagged with this environment slug.
|
|
19776
19792
|
* @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
|
|
19777
|
-
* @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.
|
|
19793
|
+
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
|
|
19778
19794
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
19779
19795
|
* @param options.projectId The id of the project to create the dataset in. This takes precedence over `project` if specified.
|
|
19780
19796
|
* @param options.metadata A dictionary with additional data about the dataset. The values in `metadata` can be any JSON-serializable type, but its keys must be strings.
|
|
@@ -19811,8 +19827,8 @@ type InitLoggerOptions<IsAsyncFlush> = FullLoginOptions & {
|
|
|
19811
19827
|
* @param options.projectId The id of the project to log into. This takes precedence over projectName if specified.
|
|
19812
19828
|
* @param options.asyncFlush If true, will log asynchronously in the background. Otherwise, will log synchronously. (true by default)
|
|
19813
19829
|
* @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
|
|
19814
|
-
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable.
|
|
19815
|
-
* key is specified, will prompt the user to login.
|
|
19830
|
+
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js,
|
|
19831
|
+
* if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
|
|
19816
19832
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
19817
19833
|
* @param options.forceLogin Login again, even if you have already logged in (by default, the logger will not login if you are already logged in)
|
|
19818
19834
|
* @param options.debugLogLevel Enables internal Braintrust SDK troubleshooting output. Use `"error"`, `"warn"`, `"info"`, or `"debug"` to choose an explicit level, or `false` to explicitly disable it. If omitted, the SDK stays silent unless `BRAINTRUST_DEBUG_LOG_LEVEL` is set.
|
|
@@ -19878,8 +19894,8 @@ type LoadParametersByProjectIdWithEnvOptions = LoadParametersBaseOptions & {
|
|
|
19878
19894
|
* @param options.defaults (Optional) A dictionary of default values to use when rendering the prompt. Prompt values will override these defaults.
|
|
19879
19895
|
* @param options.noTrace If true, do not include logging metadata for this prompt when build() is called.
|
|
19880
19896
|
* @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
|
|
19881
|
-
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable.
|
|
19882
|
-
* key is specified, will prompt the user to login.
|
|
19897
|
+
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js,
|
|
19898
|
+
* if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
|
|
19883
19899
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
19884
19900
|
* @returns The prompt object.
|
|
19885
19901
|
* @throws If the prompt is not found.
|
|
@@ -19905,7 +19921,7 @@ declare function loadPrompt({ projectName, projectId, slug, version, environment
|
|
|
19905
19921
|
* @param options.environment Fetch the version of the parameters assigned to the specified environment (e.g. "production", "staging"). If both `version` and `environment` are provided, `version` takes precedence.
|
|
19906
19922
|
* @param options.id The id of specific parameters to load. If specified, this takes precedence over all other parameters (project and slug).
|
|
19907
19923
|
* @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
|
|
19908
|
-
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable.
|
|
19924
|
+
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories.
|
|
19909
19925
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
19910
19926
|
* @returns The parameters object.
|
|
19911
19927
|
* @throws If the parameters are not found.
|
|
@@ -19935,7 +19951,7 @@ interface LoginOptions {
|
|
|
19935
19951
|
*/
|
|
19936
19952
|
appUrl?: string;
|
|
19937
19953
|
/**
|
|
19938
|
-
* The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable.
|
|
19954
|
+
* The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories.
|
|
19939
19955
|
*/
|
|
19940
19956
|
apiKey?: string;
|
|
19941
19957
|
/**
|
|
@@ -19993,8 +20009,8 @@ declare function setMaskingFunction(maskingFunction: ((value: unknown) => unknow
|
|
|
19993
20009
|
*
|
|
19994
20010
|
* @param options Options for configuring login().
|
|
19995
20011
|
* @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
|
|
19996
|
-
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable.
|
|
19997
|
-
* key is specified, will prompt the user to login.
|
|
20012
|
+
* @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js,
|
|
20013
|
+
* if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
|
|
19998
20014
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
19999
20015
|
* @param options.forceLogin Login again, even if you have already logged in (by default, this function will exit quickly if you have already logged in)
|
|
20000
20016
|
*/
|
|
@@ -20438,17 +20454,19 @@ declare class Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY
|
|
|
20438
20454
|
* about anything else that's relevant, that you can use to help find and analyze examples later. For example, you could log the
|
|
20439
20455
|
* `prompt`, example's `id`, or anything else that would be useful to slice/dice later. The values in `metadata` can be any
|
|
20440
20456
|
* JSON-serializable type, but its keys must be strings.
|
|
20457
|
+
* @param event.origin (Optional) a reference to the source object this dataset record was derived from.
|
|
20441
20458
|
* @param event.id (Optional) a unique identifier for the event. If you don't provide one, Braintrust will generate one for you.
|
|
20442
20459
|
* @param event.output: (Deprecated) The output of your application. Use `expected` instead.
|
|
20443
20460
|
* @returns The `id` of the logged record.
|
|
20444
20461
|
*/
|
|
20445
|
-
insert({ input, expected, metadata, tags, id, output, }: {
|
|
20462
|
+
insert({ input, expected, metadata, tags, id, output, origin, }: {
|
|
20446
20463
|
readonly input?: unknown;
|
|
20447
20464
|
readonly expected?: unknown;
|
|
20448
20465
|
readonly tags?: string[];
|
|
20449
20466
|
readonly metadata?: Record<string, unknown>;
|
|
20450
20467
|
readonly id?: string;
|
|
20451
20468
|
readonly output?: unknown;
|
|
20469
|
+
readonly origin?: ObjectReferenceType$1;
|
|
20452
20470
|
}): string;
|
|
20453
20471
|
/**
|
|
20454
20472
|
* Update fields of a single record in the dataset. The updated fields will be batched and uploaded behind the scenes.
|
|
@@ -22310,7 +22328,7 @@ declare class SpanFetcher extends ObjectFetcher<SpanRecord> {
|
|
|
22310
22328
|
private readonly rootSpanId;
|
|
22311
22329
|
private readonly _state;
|
|
22312
22330
|
private readonly spanTypeFilter?;
|
|
22313
|
-
constructor(objectType: "experiment" | "project_logs" | "playground_logs", _objectId: string, rootSpanId: string, _state: BraintrustState, spanTypeFilter?: string[] | undefined);
|
|
22331
|
+
constructor(objectType: "experiment" | "project_logs" | "playground_logs", _objectId: string, rootSpanId: string, _state: BraintrustState, spanTypeFilter?: string[] | undefined, includeScorers?: boolean);
|
|
22314
22332
|
private static buildFilter;
|
|
22315
22333
|
get id(): Promise<string>;
|
|
22316
22334
|
protected getState(): Promise<BraintrustState>;
|
|
@@ -22347,8 +22365,9 @@ declare class CachedSpanFetcher {
|
|
|
22347
22365
|
private fetchFn;
|
|
22348
22366
|
constructor(objectType: "experiment" | "project_logs" | "playground_logs", objectId: string, rootSpanId: string, getState: () => Promise<BraintrustState>);
|
|
22349
22367
|
constructor(fetchFn: SpanFetchFn);
|
|
22350
|
-
getSpans({ spanType }?: {
|
|
22368
|
+
getSpans({ spanType, includeScorers, }?: {
|
|
22351
22369
|
spanType?: string[];
|
|
22370
|
+
includeScorers?: boolean;
|
|
22352
22371
|
}): Promise<SpanData[]>;
|
|
22353
22372
|
private fetchSpans;
|
|
22354
22373
|
private getFromCache;
|
|
@@ -22364,6 +22383,10 @@ interface GetThreadOptions {
|
|
|
22364
22383
|
*/
|
|
22365
22384
|
preprocessor?: string;
|
|
22366
22385
|
}
|
|
22386
|
+
interface GetSpansOptions {
|
|
22387
|
+
spanType?: string[];
|
|
22388
|
+
includeScorers?: boolean;
|
|
22389
|
+
}
|
|
22367
22390
|
/**
|
|
22368
22391
|
* Interface for trace objects that can be used by scorers.
|
|
22369
22392
|
* Both the SDK's LocalTrace class and the API wrapper's WrapperTrace implement this.
|
|
@@ -22374,9 +22397,7 @@ interface Trace {
|
|
|
22374
22397
|
object_id: string;
|
|
22375
22398
|
root_span_id: string;
|
|
22376
22399
|
};
|
|
22377
|
-
getSpans(options?:
|
|
22378
|
-
spanType?: string[];
|
|
22379
|
-
}): Promise<SpanData[]>;
|
|
22400
|
+
getSpans(options?: GetSpansOptions): Promise<SpanData[]>;
|
|
22380
22401
|
/**
|
|
22381
22402
|
* Get the thread (preprocessed messages) for this trace.
|
|
22382
22403
|
* Uses the project default preprocessor, falling back to the global "thread" preprocessor.
|
|
@@ -40866,7 +40887,7 @@ type EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = Def
|
|
|
40866
40887
|
type EvalResult<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalCase<Input, Expected, Metadata> & {
|
|
40867
40888
|
output: Output;
|
|
40868
40889
|
error: unknown;
|
|
40869
|
-
origin?: ObjectReferenceType;
|
|
40890
|
+
origin?: ObjectReferenceType$1;
|
|
40870
40891
|
scores: Record<string, number | null>;
|
|
40871
40892
|
classifications?: Record<string, ClassificationItem[]>;
|
|
40872
40893
|
};
|
|
@@ -41129,6 +41150,112 @@ type ScoreAccumulator = {
|
|
|
41129
41150
|
declare function buildLocalSummary(evaluator: EvaluatorDef<any, any, any, any>, results: EvalResult<any, any, any, any>[], precomputedScores?: ScoreAccumulator): ExperimentSummary;
|
|
41130
41151
|
declare function reportFailures<Input, Output, Expected, Metadata extends BaseMetadata>(evaluator: EvaluatorDef<Input, Output, Expected, Metadata>, failingResults: EvalResult<Input, Output, Expected, Metadata>[], { verbose, jsonl }: ReporterOpts): void;
|
|
41131
41152
|
|
|
41153
|
+
type DatasetPipelineRow = {
|
|
41154
|
+
input?: unknown;
|
|
41155
|
+
output?: unknown;
|
|
41156
|
+
expected?: unknown;
|
|
41157
|
+
tags?: string[];
|
|
41158
|
+
metadata?: Record<string, unknown>;
|
|
41159
|
+
id?: string;
|
|
41160
|
+
};
|
|
41161
|
+
type DatasetPipelineTransformResult = DatasetPipelineRow | DatasetPipelineRow[] | null | undefined;
|
|
41162
|
+
type DatasetPipelineDefinition<Scope extends "span" | "trace"> = {
|
|
41163
|
+
/** The name of the dataset pipeline as it will show up in Braintrust */
|
|
41164
|
+
name?: string;
|
|
41165
|
+
/** Information about what spans/traces should be passed into the dataset pipeline. */
|
|
41166
|
+
source: {
|
|
41167
|
+
/** What project to take spans/traces from. Has precedence over `projectName`. */
|
|
41168
|
+
projectId?: string;
|
|
41169
|
+
/** What project to take spans/traces from. */
|
|
41170
|
+
projectName?: string;
|
|
41171
|
+
/** What organization to take spans/traces from. */
|
|
41172
|
+
orgName?: string;
|
|
41173
|
+
/** An optional BTQL filter to filter spans by. Not providing this filter means all spans/traces are eligible for the pipeline. */
|
|
41174
|
+
filter?: string;
|
|
41175
|
+
/**
|
|
41176
|
+
* Whether to pass exclusively spans or entire traces to the pipeline. Affects the transform input arguments.
|
|
41177
|
+
*
|
|
41178
|
+
* Defaults to: `"span"`
|
|
41179
|
+
*/
|
|
41180
|
+
scope?: Scope;
|
|
41181
|
+
};
|
|
41182
|
+
/**
|
|
41183
|
+
* A transformation function that either receives a span or a trace, depending on what scope was defined in the `source.scope` option.
|
|
41184
|
+
*
|
|
41185
|
+
* Can return one or more new rows for the target dataset, or `null`/`undefined` if no new row should be inserted.
|
|
41186
|
+
*/
|
|
41187
|
+
transform: (transformInput: Scope extends "span" ? {
|
|
41188
|
+
id: string;
|
|
41189
|
+
input: unknown;
|
|
41190
|
+
output: unknown;
|
|
41191
|
+
expected: unknown;
|
|
41192
|
+
metadata?: Record<string, unknown>;
|
|
41193
|
+
trace: Trace;
|
|
41194
|
+
} : {
|
|
41195
|
+
trace: Trace;
|
|
41196
|
+
}) => DatasetPipelineTransformResult | Promise<DatasetPipelineTransformResult>;
|
|
41197
|
+
/** Information about the target dataset */
|
|
41198
|
+
target: {
|
|
41199
|
+
/** Id of the project where the dataset currently lives or should be created or updated. */
|
|
41200
|
+
projectId?: string;
|
|
41201
|
+
/** Name of the project where the dataset currently lives or should be created or updated. */
|
|
41202
|
+
projectName?: string;
|
|
41203
|
+
/** Organization name of the project where the dataset currently lives or should be created or updated. */
|
|
41204
|
+
orgName?: string;
|
|
41205
|
+
/** Name of the dataset. Either the current name or new name if the dataset is created or updated. */
|
|
41206
|
+
datasetName: string;
|
|
41207
|
+
/** Description of the dataset when the dataset is created or updated. */
|
|
41208
|
+
description?: string;
|
|
41209
|
+
/** Metadata of the dataset when the dataset is created or updated. */
|
|
41210
|
+
metadata?: Record<string, unknown>;
|
|
41211
|
+
};
|
|
41212
|
+
};
|
|
41213
|
+
/**
|
|
41214
|
+
* This is the interface for pipelines that is exposed to `bt`
|
|
41215
|
+
*/
|
|
41216
|
+
type DatasetPipelineBtDefinition = {
|
|
41217
|
+
name?: string;
|
|
41218
|
+
source: {
|
|
41219
|
+
projectId?: string;
|
|
41220
|
+
projectName?: string;
|
|
41221
|
+
orgName?: string;
|
|
41222
|
+
filter?: string;
|
|
41223
|
+
scope: "span" | "trace";
|
|
41224
|
+
};
|
|
41225
|
+
transform: (transformInput: {
|
|
41226
|
+
id: string;
|
|
41227
|
+
input: unknown;
|
|
41228
|
+
output: unknown;
|
|
41229
|
+
expected: unknown;
|
|
41230
|
+
metadata?: Record<string, unknown>;
|
|
41231
|
+
trace: Trace;
|
|
41232
|
+
} | {
|
|
41233
|
+
trace: Trace;
|
|
41234
|
+
}) => DatasetPipelineTransformResult | Promise<DatasetPipelineTransformResult>;
|
|
41235
|
+
target: {
|
|
41236
|
+
projectId?: string;
|
|
41237
|
+
projectName?: string;
|
|
41238
|
+
orgName?: string;
|
|
41239
|
+
datasetName: string;
|
|
41240
|
+
description?: string;
|
|
41241
|
+
metadata?: Record<string, unknown>;
|
|
41242
|
+
};
|
|
41243
|
+
};
|
|
41244
|
+
declare global {
|
|
41245
|
+
var __braintrust_dataset_pipelines: DatasetPipelineBtDefinition[] | undefined;
|
|
41246
|
+
}
|
|
41247
|
+
/**
|
|
41248
|
+
* Creates a runnable dataset pipeline.
|
|
41249
|
+
*
|
|
41250
|
+
* Dataset pipelines can be used to take trace data stored in Braintrust, filter and transform it, and directly feed it back into a Braintrust dataset.
|
|
41251
|
+
*
|
|
41252
|
+
* You can run a dataset pipeline with the `bt` CLI using `bt datasets pipeline run some-file-path.ts --limit 100`.
|
|
41253
|
+
* The limit option controls how many spans/traces (depending on the `definition.source.scope` option) are discovered for the pipeline.
|
|
41254
|
+
*
|
|
41255
|
+
* @experimental - The API for this function is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
|
|
41256
|
+
*/
|
|
41257
|
+
declare function DatasetPipeline<Scope extends "span" | "trace">(definition: DatasetPipelineDefinition<Scope>): void;
|
|
41258
|
+
|
|
41132
41259
|
interface InstrumentationIntegrationsConfig {
|
|
41133
41260
|
openai?: boolean;
|
|
41134
41261
|
anthropic?: boolean;
|
|
@@ -41240,6 +41367,7 @@ declare const exports$1_DEFAULT_MAX_REQUEST_SIZE: typeof DEFAULT_MAX_REQUEST_SIZ
|
|
|
41240
41367
|
type exports$1_DataSummary = DataSummary;
|
|
41241
41368
|
type exports$1_Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = Dataset<IsLegacyDataset>;
|
|
41242
41369
|
declare const exports$1_Dataset: typeof Dataset;
|
|
41370
|
+
declare const exports$1_DatasetPipeline: typeof DatasetPipeline;
|
|
41243
41371
|
type exports$1_DatasetRecord<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = DatasetRecord<IsLegacyDataset>;
|
|
41244
41372
|
type exports$1_DatasetRestorePreviewResult = DatasetRestorePreviewResult;
|
|
41245
41373
|
type exports$1_DatasetRestoreResult = DatasetRestoreResult;
|
|
@@ -41469,7 +41597,7 @@ declare const exports$1_wrapOpenRouterAgent: typeof wrapOpenRouterAgent;
|
|
|
41469
41597
|
declare const exports$1_wrapTraced: typeof wrapTraced;
|
|
41470
41598
|
declare const exports$1_wrapVitest: typeof wrapVitest;
|
|
41471
41599
|
declare namespace exports$1 {
|
|
41472
|
-
export { type exports$1_AnyDataset as AnyDataset, exports$1_Attachment as Attachment, type exports$1_AttachmentParams as AttachmentParams, exports$1_AttachmentReference as AttachmentReference, exports$1_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, exports$1_BraintrustLangChainCallbackHandler as BraintrustLangChainCallbackHandler, exports$1_BraintrustMiddleware as BraintrustMiddleware, exports$1_BraintrustState as BraintrustState, exports$1_BraintrustStream as BraintrustStream, type exports$1_BraintrustStreamChunk as BraintrustStreamChunk, exports$1_CachedSpanFetcher as CachedSpanFetcher, type exports$1_ChatPrompt as ChatPrompt, exports$1_CodeFunction as CodeFunction, type exports$1_CodeOpts as CodeOpts, exports$1_CodePrompt as CodePrompt, type exports$1_CommentEvent as CommentEvent, type exports$1_CompiledPrompt as CompiledPrompt, type exports$1_CompiledPromptParams as CompiledPromptParams, type exports$1_CompletionPrompt as CompletionPrompt, exports$1_ContextManager as ContextManager, type exports$1_ContextParentSpanIds as ContextParentSpanIds, type exports$1_CreateProjectOpts as CreateProjectOpts, type exports$1_CurrentSpanStore as CurrentSpanStore, exports$1_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports$1_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports$1_DataSummary as DataSummary, exports$1_Dataset as Dataset, type exports$1_DatasetRecord as DatasetRecord, type exports$1_DatasetRestorePreviewResult as DatasetRestorePreviewResult, type exports$1_DatasetRestoreResult as DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type exports$1_DatasetSummary as DatasetSummary, type exports$1_DefaultMetadataType as DefaultMetadataType, type exports$1_DefaultPromptArgs as DefaultPromptArgs, exports$1_ERR_PERMALINK as ERR_PERMALINK, type exports$1_EndSpanArgs as EndSpanArgs, exports$1_Eval as Eval, type exports$1_EvalCase as EvalCase, type exports$1_EvalClassifier as EvalClassifier, type exports$1_EvalHooks as EvalHooks, type exports$1_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports$1_EvalParameters as EvalParameters, type exports$1_EvalResult as EvalResult, exports$1_EvalResultWithSummary as EvalResultWithSummary, type exports$1_EvalScorer as EvalScorer, type exports$1_EvalScorerArgs as EvalScorerArgs, type exports$1_EvalTask as EvalTask, type exports$1_Evaluator as Evaluator, type exports$1_EvaluatorDef as EvaluatorDef, type exports$1_EvaluatorDefinition as EvaluatorDefinition, type exports$1_EvaluatorDefinitions as EvaluatorDefinitions, type exports$1_EvaluatorFile as EvaluatorFile, type exports$1_EvaluatorManifest as EvaluatorManifest, exports$1_Experiment as Experiment, type exports$1_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports$1_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports$1_ExperimentSummary as ExperimentSummary, type exports$1_Exportable as Exportable, exports$1_ExternalAttachment as ExternalAttachment, type exports$1_ExternalAttachmentParams as ExternalAttachmentParams, exports$1_FailedHTTPResponse as FailedHTTPResponse, type exports$1_FullInitDatasetOptions as FullInitDatasetOptions, type exports$1_FullInitOptions as FullInitOptions, type exports$1_FullLoginOptions as FullLoginOptions, type exports$1_FunctionEvent as FunctionEvent, type exports$1_GetThreadOptions as GetThreadOptions, exports$1_IDGenerator as IDGenerator, type exports$1_IdField as IdField, type exports$1_InitDatasetOptions as InitDatasetOptions, type exports$1_InitLoggerOptions as InitLoggerOptions, type exports$1_InitOptions as InitOptions, type exports$1_InputField as InputField, type exports$1_InstrumentationConfig as InstrumentationConfig, type exports$1_InvokeFunctionArgs as InvokeFunctionArgs, type exports$1_InvokeReturn as InvokeReturn, exports$1_JSONAttachment as JSONAttachment, exports$1_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports$1_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, type exports$1_LangChainCallbackHandlerOptions as LangChainCallbackHandlerOptions, exports$1_LazyValue as LazyValue, type exports$1_LoadPromptOptions as LoadPromptOptions, type exports$1_LogCommentFullArgs as LogCommentFullArgs, type exports$1_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports$1_LogOptions as LogOptions, exports$1_Logger as Logger, exports$1_LoginInvalidOrgError as LoginInvalidOrgError, type exports$1_LoginOptions as LoginOptions, type exports$1_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports$1_Logs3OverflowUpload as Logs3OverflowUpload, type exports$1_MetricSummary as MetricSummary, exports$1_NOOP_SPAN as NOOP_SPAN, exports$1_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports$1_NoopSpan as NoopSpan, exports$1_ObjectFetcher as ObjectFetcher, type exports$1_ObjectMetadata as ObjectMetadata, type exports$1_OtherExperimentLogFields as OtherExperimentLogFields, type exports$1_ParametersSource as ParametersSource, type exports$1_ParentExperimentIds as ParentExperimentIds, type exports$1_ParentProjectLogIds as ParentProjectLogIds, exports$1_Project as Project, exports$1_ProjectNameIdMap as ProjectNameIdMap, type exports$1_PromiseUnless as PromiseUnless, exports$1_Prompt as Prompt, exports$1_PromptBuilder as PromptBuilder, type exports$1_PromptContents as PromptContents, type exports$1_PromptDefinition as PromptDefinition, type exports$1_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports$1_PromptOpts as PromptOpts, type exports$1_PromptRowWithId as PromptRowWithId, exports$1_ReadonlyAttachment as ReadonlyAttachment, exports$1_ReadonlyExperiment as ReadonlyExperiment, type exports$1_RegisterSandboxOptions as RegisterSandboxOptions, type exports$1_RegisterSandboxResult as RegisterSandboxResult, exports$1_Reporter as Reporter, type exports$1_ReporterBody as ReporterBody, type exports$1_SandboxConfig as SandboxConfig, type exports$1_ScoreSummary as ScoreSummary, exports$1_ScorerBuilder as ScorerBuilder, type exports$1_ScorerOpts as ScorerOpts, type exports$1_SerializedBraintrustState as SerializedBraintrustState, type exports$1_SetCurrentArg as SetCurrentArg, type exports$1_Span as Span, type exports$1_SpanContext as SpanContext, type exports$1_SpanData as SpanData, exports$1_SpanFetcher as SpanFetcher, exports$1_SpanImpl as SpanImpl, type exports$1_StartSpanArgs as StartSpanArgs, type exports$1_TemplateFormat as TemplateFormat, type exports$1_TemplateRenderer as TemplateRenderer, type exports$1_TemplateRendererPlugin as TemplateRendererPlugin, exports$1_TestBackgroundLogger as TestBackgroundLogger, exports$1_ToolBuilder as ToolBuilder, type exports$1_Trace as Trace, exports$1_UUIDGenerator as UUIDGenerator, type exports$1_WithTransactionId as WithTransactionId, exports$1_X_CACHED_HEADER as X_CACHED_HEADER, exports$1__exportsForTestingOnly as _exportsForTestingOnly, exports$1__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports$1__internalSetInitialState as _internalSetInitialState, exports$1_addAzureBlobHeaders as addAzureBlobHeaders, exports$1_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, exports$1_configureInstrumentation as configureInstrumentation, exports$1_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports$1_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports$1_currentExperiment as currentExperiment, exports$1_currentLogger as currentLogger, exports$1_currentSpan as currentSpan, exports$1_deepCopyEvent as deepCopyEvent, exports$1_defaultErrorScoreHandler as defaultErrorScoreHandler, exports$1_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports$1_flush as flush, exports$1_getContextManager as getContextManager, exports$1_getIdGenerator as getIdGenerator, exports$1_getPromptVersions as getPromptVersions, exports$1_getSpanParentObject as getSpanParentObject, exports$1_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports$1_init as init, exports$1_initDataset as initDataset, exports$1_initExperiment as initExperiment, exports$1_initFunction as initFunction, exports$1_initLogger as initLogger, exports$1_initNodeTestSuite as initNodeTestSuite, exports$1_invoke as invoke, exports$1_isTemplateFormat as isTemplateFormat, exports$1_loadParameters as loadParameters, exports$1_loadPrompt as loadPrompt, exports$1_log as log, exports$1_logError as logError, exports$1_login as login, exports$1_loginToState as loginToState, exports$1_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports$1_newId as newId, exports$1_parseCachedHeader as parseCachedHeader, exports$1_parseTemplateFormat as parseTemplateFormat, exports$1_permalink as permalink, exports$1_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports$1_projects as projects, exports$1_promptContentsSchema as promptContentsSchema, exports$1_promptDefinitionSchema as promptDefinitionSchema, exports$1_promptDefinitionToPromptData as promptDefinitionToPromptData, exports$1_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports$1_registerOtelFlush as registerOtelFlush, exports$1_registerSandbox as registerSandbox, exports$1_registerTemplatePlugin as registerTemplatePlugin, exports$1_renderMessage as renderMessage, exports$1_renderPromptParams as renderPromptParams, exports$1_renderTemplateContent as renderTemplateContent, exports$1_reportFailures as reportFailures, exports$1_runEvaluator as runEvaluator, exports$1_setFetch as setFetch, exports$1_setMaskingFunction as setMaskingFunction, exports$1_spanComponentsToObjectId as spanComponentsToObjectId, exports$1_startSpan as startSpan, exports$1_summarize as summarize, exports$1_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports$1_traceable as traceable, exports$1_traced as traced, exports$1_updateSpan as updateSpan, exports$1_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports$1_utf8ByteLength as utf8ByteLength, exports$1_withCurrent as withCurrent, exports$1_withDataset as withDataset, exports$1_withExperiment as withExperiment, exports$1_withLogger as withLogger, exports$1_withParent as withParent, exports$1_wrapAISDK as wrapAISDK, exports$1_wrapAISDKModel as wrapAISDKModel, exports$1_wrapAgentClass as wrapAgentClass, exports$1_wrapAnthropic as wrapAnthropic, exports$1_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapFlueContext as wrapFlueContext, exports$1_wrapFlueSession as wrapFlueSession, exports$1_wrapGenkit as wrapGenkit, exports$1_wrapGoogleADK as wrapGoogleADK, exports$1_wrapGoogleGenAI as wrapGoogleGenAI, exports$1_wrapGroq as wrapGroq, exports$1_wrapHuggingFace as wrapHuggingFace, exports$1_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, exports$1_wrapOpenAI as wrapOpenAI, exports$1_wrapOpenAICodexSDK as wrapOpenAICodexSDK, exports$1_wrapOpenAIv4 as wrapOpenAIv4, exports$1_wrapOpenRouter as wrapOpenRouter, exports$1_wrapOpenRouterAgent as wrapOpenRouterAgent, exports$1_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest };
|
|
41600
|
+
export { type exports$1_AnyDataset as AnyDataset, exports$1_Attachment as Attachment, type exports$1_AttachmentParams as AttachmentParams, exports$1_AttachmentReference as AttachmentReference, exports$1_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, exports$1_BraintrustLangChainCallbackHandler as BraintrustLangChainCallbackHandler, exports$1_BraintrustMiddleware as BraintrustMiddleware, exports$1_BraintrustState as BraintrustState, exports$1_BraintrustStream as BraintrustStream, type exports$1_BraintrustStreamChunk as BraintrustStreamChunk, exports$1_CachedSpanFetcher as CachedSpanFetcher, type exports$1_ChatPrompt as ChatPrompt, exports$1_CodeFunction as CodeFunction, type exports$1_CodeOpts as CodeOpts, exports$1_CodePrompt as CodePrompt, type exports$1_CommentEvent as CommentEvent, type exports$1_CompiledPrompt as CompiledPrompt, type exports$1_CompiledPromptParams as CompiledPromptParams, type exports$1_CompletionPrompt as CompletionPrompt, exports$1_ContextManager as ContextManager, type exports$1_ContextParentSpanIds as ContextParentSpanIds, type exports$1_CreateProjectOpts as CreateProjectOpts, type exports$1_CurrentSpanStore as CurrentSpanStore, exports$1_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports$1_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports$1_DataSummary as DataSummary, exports$1_Dataset as Dataset, exports$1_DatasetPipeline as DatasetPipeline, type exports$1_DatasetRecord as DatasetRecord, type exports$1_DatasetRestorePreviewResult as DatasetRestorePreviewResult, type exports$1_DatasetRestoreResult as DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type exports$1_DatasetSummary as DatasetSummary, type exports$1_DefaultMetadataType as DefaultMetadataType, type exports$1_DefaultPromptArgs as DefaultPromptArgs, exports$1_ERR_PERMALINK as ERR_PERMALINK, type exports$1_EndSpanArgs as EndSpanArgs, exports$1_Eval as Eval, type exports$1_EvalCase as EvalCase, type exports$1_EvalClassifier as EvalClassifier, type exports$1_EvalHooks as EvalHooks, type exports$1_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports$1_EvalParameters as EvalParameters, type exports$1_EvalResult as EvalResult, exports$1_EvalResultWithSummary as EvalResultWithSummary, type exports$1_EvalScorer as EvalScorer, type exports$1_EvalScorerArgs as EvalScorerArgs, type exports$1_EvalTask as EvalTask, type exports$1_Evaluator as Evaluator, type exports$1_EvaluatorDef as EvaluatorDef, type exports$1_EvaluatorDefinition as EvaluatorDefinition, type exports$1_EvaluatorDefinitions as EvaluatorDefinitions, type exports$1_EvaluatorFile as EvaluatorFile, type exports$1_EvaluatorManifest as EvaluatorManifest, exports$1_Experiment as Experiment, type exports$1_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports$1_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports$1_ExperimentSummary as ExperimentSummary, type exports$1_Exportable as Exportable, exports$1_ExternalAttachment as ExternalAttachment, type exports$1_ExternalAttachmentParams as ExternalAttachmentParams, exports$1_FailedHTTPResponse as FailedHTTPResponse, type exports$1_FullInitDatasetOptions as FullInitDatasetOptions, type exports$1_FullInitOptions as FullInitOptions, type exports$1_FullLoginOptions as FullLoginOptions, type exports$1_FunctionEvent as FunctionEvent, type exports$1_GetThreadOptions as GetThreadOptions, exports$1_IDGenerator as IDGenerator, type exports$1_IdField as IdField, type exports$1_InitDatasetOptions as InitDatasetOptions, type exports$1_InitLoggerOptions as InitLoggerOptions, type exports$1_InitOptions as InitOptions, type exports$1_InputField as InputField, type exports$1_InstrumentationConfig as InstrumentationConfig, type exports$1_InvokeFunctionArgs as InvokeFunctionArgs, type exports$1_InvokeReturn as InvokeReturn, exports$1_JSONAttachment as JSONAttachment, exports$1_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports$1_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, type exports$1_LangChainCallbackHandlerOptions as LangChainCallbackHandlerOptions, exports$1_LazyValue as LazyValue, type exports$1_LoadPromptOptions as LoadPromptOptions, type exports$1_LogCommentFullArgs as LogCommentFullArgs, type exports$1_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports$1_LogOptions as LogOptions, exports$1_Logger as Logger, exports$1_LoginInvalidOrgError as LoginInvalidOrgError, type exports$1_LoginOptions as LoginOptions, type exports$1_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports$1_Logs3OverflowUpload as Logs3OverflowUpload, type exports$1_MetricSummary as MetricSummary, exports$1_NOOP_SPAN as NOOP_SPAN, exports$1_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports$1_NoopSpan as NoopSpan, exports$1_ObjectFetcher as ObjectFetcher, type exports$1_ObjectMetadata as ObjectMetadata, type exports$1_OtherExperimentLogFields as OtherExperimentLogFields, type exports$1_ParametersSource as ParametersSource, type exports$1_ParentExperimentIds as ParentExperimentIds, type exports$1_ParentProjectLogIds as ParentProjectLogIds, exports$1_Project as Project, exports$1_ProjectNameIdMap as ProjectNameIdMap, type exports$1_PromiseUnless as PromiseUnless, exports$1_Prompt as Prompt, exports$1_PromptBuilder as PromptBuilder, type exports$1_PromptContents as PromptContents, type exports$1_PromptDefinition as PromptDefinition, type exports$1_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports$1_PromptOpts as PromptOpts, type exports$1_PromptRowWithId as PromptRowWithId, exports$1_ReadonlyAttachment as ReadonlyAttachment, exports$1_ReadonlyExperiment as ReadonlyExperiment, type exports$1_RegisterSandboxOptions as RegisterSandboxOptions, type exports$1_RegisterSandboxResult as RegisterSandboxResult, exports$1_Reporter as Reporter, type exports$1_ReporterBody as ReporterBody, type exports$1_SandboxConfig as SandboxConfig, type exports$1_ScoreSummary as ScoreSummary, exports$1_ScorerBuilder as ScorerBuilder, type exports$1_ScorerOpts as ScorerOpts, type exports$1_SerializedBraintrustState as SerializedBraintrustState, type exports$1_SetCurrentArg as SetCurrentArg, type exports$1_Span as Span, type exports$1_SpanContext as SpanContext, type exports$1_SpanData as SpanData, exports$1_SpanFetcher as SpanFetcher, exports$1_SpanImpl as SpanImpl, type exports$1_StartSpanArgs as StartSpanArgs, type exports$1_TemplateFormat as TemplateFormat, type exports$1_TemplateRenderer as TemplateRenderer, type exports$1_TemplateRendererPlugin as TemplateRendererPlugin, exports$1_TestBackgroundLogger as TestBackgroundLogger, exports$1_ToolBuilder as ToolBuilder, type exports$1_Trace as Trace, exports$1_UUIDGenerator as UUIDGenerator, type exports$1_WithTransactionId as WithTransactionId, exports$1_X_CACHED_HEADER as X_CACHED_HEADER, exports$1__exportsForTestingOnly as _exportsForTestingOnly, exports$1__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports$1__internalSetInitialState as _internalSetInitialState, exports$1_addAzureBlobHeaders as addAzureBlobHeaders, exports$1_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, exports$1_configureInstrumentation as configureInstrumentation, exports$1_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports$1_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports$1_currentExperiment as currentExperiment, exports$1_currentLogger as currentLogger, exports$1_currentSpan as currentSpan, exports$1_deepCopyEvent as deepCopyEvent, exports$1_defaultErrorScoreHandler as defaultErrorScoreHandler, exports$1_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports$1_flush as flush, exports$1_getContextManager as getContextManager, exports$1_getIdGenerator as getIdGenerator, exports$1_getPromptVersions as getPromptVersions, exports$1_getSpanParentObject as getSpanParentObject, exports$1_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports$1_init as init, exports$1_initDataset as initDataset, exports$1_initExperiment as initExperiment, exports$1_initFunction as initFunction, exports$1_initLogger as initLogger, exports$1_initNodeTestSuite as initNodeTestSuite, exports$1_invoke as invoke, exports$1_isTemplateFormat as isTemplateFormat, exports$1_loadParameters as loadParameters, exports$1_loadPrompt as loadPrompt, exports$1_log as log, exports$1_logError as logError, exports$1_login as login, exports$1_loginToState as loginToState, exports$1_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports$1_newId as newId, exports$1_parseCachedHeader as parseCachedHeader, exports$1_parseTemplateFormat as parseTemplateFormat, exports$1_permalink as permalink, exports$1_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports$1_projects as projects, exports$1_promptContentsSchema as promptContentsSchema, exports$1_promptDefinitionSchema as promptDefinitionSchema, exports$1_promptDefinitionToPromptData as promptDefinitionToPromptData, exports$1_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports$1_registerOtelFlush as registerOtelFlush, exports$1_registerSandbox as registerSandbox, exports$1_registerTemplatePlugin as registerTemplatePlugin, exports$1_renderMessage as renderMessage, exports$1_renderPromptParams as renderPromptParams, exports$1_renderTemplateContent as renderTemplateContent, exports$1_reportFailures as reportFailures, exports$1_runEvaluator as runEvaluator, exports$1_setFetch as setFetch, exports$1_setMaskingFunction as setMaskingFunction, exports$1_spanComponentsToObjectId as spanComponentsToObjectId, exports$1_startSpan as startSpan, exports$1_summarize as summarize, exports$1_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports$1_traceable as traceable, exports$1_traced as traced, exports$1_updateSpan as updateSpan, exports$1_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports$1_utf8ByteLength as utf8ByteLength, exports$1_withCurrent as withCurrent, exports$1_withDataset as withDataset, exports$1_withExperiment as withExperiment, exports$1_withLogger as withLogger, exports$1_withParent as withParent, exports$1_wrapAISDK as wrapAISDK, exports$1_wrapAISDKModel as wrapAISDKModel, exports$1_wrapAgentClass as wrapAgentClass, exports$1_wrapAnthropic as wrapAnthropic, exports$1_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapFlueContext as wrapFlueContext, exports$1_wrapFlueSession as wrapFlueSession, exports$1_wrapGenkit as wrapGenkit, exports$1_wrapGoogleADK as wrapGoogleADK, exports$1_wrapGoogleGenAI as wrapGoogleGenAI, exports$1_wrapGroq as wrapGroq, exports$1_wrapHuggingFace as wrapHuggingFace, exports$1_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, exports$1_wrapOpenAI as wrapOpenAI, exports$1_wrapOpenAICodexSDK as wrapOpenAICodexSDK, exports$1_wrapOpenAIv4 as wrapOpenAIv4, exports$1_wrapOpenRouter as wrapOpenRouter, exports$1_wrapOpenRouterAgent as wrapOpenRouterAgent, exports$1_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest };
|
|
41473
41601
|
}
|
|
41474
41602
|
|
|
41475
|
-
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustLangChainCallbackHandler, 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, type LangChainCallbackHandlerOptions, 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$1 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, wrapCopilotClient, wrapCursorSDK, wrapFlueContext, wrapFlueSession, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
|
|
41603
|
+
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustLangChainCallbackHandler, 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, DatasetPipeline, 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, type LangChainCallbackHandlerOptions, 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$1 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, wrapCopilotClient, wrapCursorSDK, wrapFlueContext, wrapFlueSession, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
|