braintrust 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -67
- package/dev/dist/index.d.mts +53 -9
- package/dev/dist/index.d.ts +53 -9
- package/dev/dist/index.js +1839 -1298
- package/dev/dist/index.mjs +1503 -962
- package/dist/auto-instrumentations/bundler/esbuild.cjs +270 -23
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +270 -23
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +270 -23
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack.cjs +270 -23
- package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
- package/dist/auto-instrumentations/{chunk-OLOPGWTJ.mjs → chunk-D5ZPIUEL.mjs} +1 -1
- package/dist/auto-instrumentations/chunk-LVWWLUMN.mjs +535 -0
- package/dist/auto-instrumentations/hook.mjs +306 -23
- package/dist/auto-instrumentations/index.cjs +270 -23
- package/dist/auto-instrumentations/index.d.mts +5 -5
- package/dist/auto-instrumentations/index.d.ts +5 -5
- package/dist/auto-instrumentations/index.mjs +1 -1
- package/dist/auto-instrumentations/loader/esm-hook.mjs +7 -8
- package/dist/browser.d.mts +474 -47
- package/dist/browser.d.ts +474 -47
- package/dist/browser.js +2258 -2095
- package/dist/browser.mjs +2258 -2095
- package/dist/cli.js +1817 -1232
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +2188 -2027
- package/dist/edge-light.mjs +2188 -2027
- package/dist/index.d.mts +474 -47
- package/dist/index.d.ts +474 -47
- package/dist/index.js +2576 -2415
- package/dist/index.mjs +2259 -2098
- package/dist/instrumentation/index.d.mts +16 -22
- package/dist/instrumentation/index.d.ts +16 -22
- package/dist/instrumentation/index.js +1558 -1068
- package/dist/instrumentation/index.mjs +1558 -1068
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +2188 -2027
- package/dist/workerd.mjs +2188 -2027
- package/package.json +6 -3
- package/dist/auto-instrumentations/chunk-KVX7OFPD.mjs +0 -288
package/dist/index.d.mts
CHANGED
|
@@ -15705,6 +15705,25 @@ interface IsoAsyncLocalStorage<T> {
|
|
|
15705
15705
|
run<R>(store: T | undefined, callback: () => R): R;
|
|
15706
15706
|
getStore(): T | undefined;
|
|
15707
15707
|
}
|
|
15708
|
+
/**
|
|
15709
|
+
* TracingChannel interface matching both node:diagnostics_channel and dc-browser.
|
|
15710
|
+
* Provides event-based instrumentation for sync/async operations.
|
|
15711
|
+
*/
|
|
15712
|
+
interface IsoTracingChannel<M = any> {
|
|
15713
|
+
hasSubscribers: boolean;
|
|
15714
|
+
subscribe(handlers: IsoChannelHandlers<M>): void;
|
|
15715
|
+
unsubscribe(handlers: IsoChannelHandlers<M>): boolean;
|
|
15716
|
+
traceSync<F extends (...args: any[]) => any>(fn: F, message: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
|
|
15717
|
+
tracePromise<F extends (...args: any[]) => any>(fn: F, message: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): Promise<Awaited<ReturnType<F>>>;
|
|
15718
|
+
traceCallback<F extends (...args: any[]) => any>(fn: F, position: number | undefined, message: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
|
|
15719
|
+
}
|
|
15720
|
+
interface IsoChannelHandlers<M = any> {
|
|
15721
|
+
start?: (context: M, name: string) => void;
|
|
15722
|
+
end?: (context: M, name: string) => void;
|
|
15723
|
+
asyncStart?: (context: M, name: string) => void;
|
|
15724
|
+
asyncEnd?: (context: M, name: string) => void;
|
|
15725
|
+
error?: (context: M, name: string) => void;
|
|
15726
|
+
}
|
|
15708
15727
|
interface Common {
|
|
15709
15728
|
buildType: "browser" | "browser-js" | "node" | "edge-light" | "workerd" | "unknown";
|
|
15710
15729
|
getRepoInfo: (settings?: GitMetadataSettingsType) => Promise<RepoInfoType | undefined>;
|
|
@@ -15712,6 +15731,7 @@ interface Common {
|
|
|
15712
15731
|
getEnv: (name: string) => string | undefined;
|
|
15713
15732
|
getCallerLocation: () => CallerLocation | undefined;
|
|
15714
15733
|
newAsyncLocalStorage: <T>() => IsoAsyncLocalStorage<T>;
|
|
15734
|
+
newTracingChannel: <M = any>(nameOrChannels: string | object) => IsoTracingChannel<M>;
|
|
15715
15735
|
processOn: (event: string, handler: (code: any) => void) => void;
|
|
15716
15736
|
hash?: (data: string) => string;
|
|
15717
15737
|
basename: (filepath: string) => string;
|
|
@@ -15740,6 +15760,10 @@ interface Common {
|
|
|
15740
15760
|
}
|
|
15741
15761
|
declare const iso: Common;
|
|
15742
15762
|
|
|
15763
|
+
type DebugLogLevel = "error" | "warn" | "info" | "debug";
|
|
15764
|
+
type DebugLogLevelOption = DebugLogLevel | false | undefined;
|
|
15765
|
+
declare function resetDebugLoggerForTests(): void;
|
|
15766
|
+
|
|
15743
15767
|
/**
|
|
15744
15768
|
* Abstract base class for ID generators
|
|
15745
15769
|
*/
|
|
@@ -18248,11 +18272,25 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
18248
18272
|
type: "function";
|
|
18249
18273
|
}[] | undefined;
|
|
18250
18274
|
}) | undefined;
|
|
18275
|
+
}>, z.ZodObject<{
|
|
18276
|
+
type: z.ZodLiteral<"model">;
|
|
18277
|
+
default: z.ZodOptional<z.ZodString>;
|
|
18278
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18279
|
+
}, "strip", z.ZodTypeAny, {
|
|
18280
|
+
type: "model";
|
|
18281
|
+
description?: string | undefined;
|
|
18282
|
+
default?: string | undefined;
|
|
18283
|
+
}, {
|
|
18284
|
+
type: "model";
|
|
18285
|
+
description?: string | undefined;
|
|
18286
|
+
default?: string | undefined;
|
|
18251
18287
|
}>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>>;
|
|
18252
18288
|
type EvalParameters = z.infer<typeof evalParametersSchema>;
|
|
18253
18289
|
type InferParameterValue<T> = T extends {
|
|
18254
18290
|
type: "prompt";
|
|
18255
|
-
} ? Prompt : T extends
|
|
18291
|
+
} ? Prompt : T extends {
|
|
18292
|
+
type: "model";
|
|
18293
|
+
} ? string : T extends z.ZodType ? z.infer<T> : never;
|
|
18256
18294
|
type InferParameters<T extends EvalParameters> = {
|
|
18257
18295
|
[K in keyof T]: InferParameterValue<T[K]>;
|
|
18258
18296
|
};
|
|
@@ -18538,6 +18576,8 @@ declare const loginSchema: z.ZodObject<{
|
|
|
18538
18576
|
collect: "some" | "none" | "all";
|
|
18539
18577
|
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
18540
18578
|
}>>>;
|
|
18579
|
+
debugLogLevel: z.ZodOptional<z.ZodEnum<["error", "warn", "info", "debug"]>>;
|
|
18580
|
+
debugLogLevelDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
18541
18581
|
}, "strict", z.ZodTypeAny, {
|
|
18542
18582
|
appUrl: string;
|
|
18543
18583
|
appPublicUrl: string;
|
|
@@ -18550,6 +18590,8 @@ declare const loginSchema: z.ZodObject<{
|
|
|
18550
18590
|
collect: "some" | "none" | "all";
|
|
18551
18591
|
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
18552
18592
|
} | null | undefined;
|
|
18593
|
+
debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
|
|
18594
|
+
debugLogLevelDisabled?: boolean | undefined;
|
|
18553
18595
|
}, {
|
|
18554
18596
|
appUrl: string;
|
|
18555
18597
|
appPublicUrl: string;
|
|
@@ -18562,6 +18604,8 @@ declare const loginSchema: z.ZodObject<{
|
|
|
18562
18604
|
collect: "some" | "none" | "all";
|
|
18563
18605
|
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
18564
18606
|
} | null | undefined;
|
|
18607
|
+
debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
|
|
18608
|
+
debugLogLevelDisabled?: boolean | undefined;
|
|
18565
18609
|
}>;
|
|
18566
18610
|
type SerializedBraintrustState = z.infer<typeof loginSchema>;
|
|
18567
18611
|
declare class BraintrustState {
|
|
@@ -18582,6 +18626,8 @@ declare class BraintrustState {
|
|
|
18582
18626
|
proxyUrl: string | null;
|
|
18583
18627
|
loggedIn: boolean;
|
|
18584
18628
|
gitMetadataSettings?: GitMetadataSettingsType;
|
|
18629
|
+
debugLogLevel?: DebugLogLevel;
|
|
18630
|
+
private debugLogLevelConfigured;
|
|
18585
18631
|
fetch: typeof globalThis.fetch;
|
|
18586
18632
|
private _appConn;
|
|
18587
18633
|
private _apiConn;
|
|
@@ -18612,6 +18658,9 @@ declare class BraintrustState {
|
|
|
18612
18658
|
static deserialize(serialized: unknown, opts?: LoginOptions): BraintrustState;
|
|
18613
18659
|
setFetch(fetch: typeof globalThis.fetch): void;
|
|
18614
18660
|
setMaskingFunction(maskingFunction: ((value: unknown) => unknown) | null): void;
|
|
18661
|
+
setDebugLogLevel(option: DebugLogLevelOption): void;
|
|
18662
|
+
getDebugLogLevel(): DebugLogLevel | undefined;
|
|
18663
|
+
hasDebugLogLevelOverride(): boolean;
|
|
18615
18664
|
login(loginParams: LoginOptions & {
|
|
18616
18665
|
forceLogin?: boolean;
|
|
18617
18666
|
}): Promise<void>;
|
|
@@ -19330,6 +19379,7 @@ type InitLoggerOptions<IsAsyncFlush> = FullLoginOptions & {
|
|
|
19330
19379
|
* key is specified, will prompt the user to login.
|
|
19331
19380
|
* @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
|
|
19332
19381
|
* @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)
|
|
19382
|
+
* @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.
|
|
19333
19383
|
* @param setCurrent If true (the default), set the global current-experiment to the newly-created one.
|
|
19334
19384
|
* @returns The newly created Logger.
|
|
19335
19385
|
*/
|
|
@@ -19473,6 +19523,19 @@ interface LoginOptions {
|
|
|
19473
19523
|
* server. Defaults to false.
|
|
19474
19524
|
*/
|
|
19475
19525
|
disableSpanCache?: boolean;
|
|
19526
|
+
/**
|
|
19527
|
+
* Controls internal Braintrust SDK troubleshooting output.
|
|
19528
|
+
*
|
|
19529
|
+
* Use `"error"`, `"warn"`, `"info"`, or `"debug"` to control how much
|
|
19530
|
+
* internal SDK troubleshooting output is emitted. Use `false` to explicitly
|
|
19531
|
+
* disable this output.
|
|
19532
|
+
*
|
|
19533
|
+
* When omitted, the SDK remains silent unless
|
|
19534
|
+
* `BRAINTRUST_DEBUG_LOG_LEVEL` is set to `"error"`, `"warn"`, `"info"`, or
|
|
19535
|
+
* `"debug"`. This option only affects local console output; it does not
|
|
19536
|
+
* change what data is logged to Braintrust.
|
|
19537
|
+
*/
|
|
19538
|
+
debugLogLevel?: DebugLogLevel | false;
|
|
19476
19539
|
}
|
|
19477
19540
|
type FullLoginOptions = LoginOptions & {
|
|
19478
19541
|
forceLogin?: boolean;
|
|
@@ -20183,6 +20246,7 @@ declare const _exportsForTestingOnly: {
|
|
|
20183
20246
|
deepCopyEvent: typeof deepCopyEvent;
|
|
20184
20247
|
useTestBackgroundLogger: typeof useTestBackgroundLogger;
|
|
20185
20248
|
clearTestBackgroundLogger: typeof clearTestBackgroundLogger;
|
|
20249
|
+
resetDebugLoggerForTests: typeof resetDebugLoggerForTests;
|
|
20186
20250
|
simulateLoginForTests: typeof simulateLoginForTests;
|
|
20187
20251
|
simulateLogoutForTests: typeof simulateLogoutForTests;
|
|
20188
20252
|
setInitialTestState: typeof setInitialTestState;
|
|
@@ -20674,24 +20738,167 @@ declare function initFunction({ projectName, slug, version, state, }: {
|
|
|
20674
20738
|
state?: BraintrustState;
|
|
20675
20739
|
}): (input: any) => Promise<any>;
|
|
20676
20740
|
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20741
|
+
declare const LEGACY_CACHED_HEADER = "x-cached";
|
|
20742
|
+
declare const X_CACHED_HEADER = "x-bt-cached";
|
|
20743
|
+
declare function parseCachedHeader(value: string | null | undefined): number | undefined;
|
|
20744
|
+
|
|
20745
|
+
/**
|
|
20746
|
+
* Vendored types for the OpenAI SDK which our wrapper and instrumentation consume.
|
|
20747
|
+
*
|
|
20748
|
+
* Should never be exposed to users of the SDK!
|
|
20749
|
+
*/
|
|
20750
|
+
interface OpenAIAPIPromise<T> extends Promise<T> {
|
|
20751
|
+
withResponse(): Promise<OpenAIWithResponse<T>>;
|
|
20684
20752
|
}
|
|
20685
|
-
interface
|
|
20686
|
-
|
|
20753
|
+
interface OpenAIWithResponse<T> {
|
|
20754
|
+
data: T;
|
|
20755
|
+
response: Response;
|
|
20756
|
+
}
|
|
20757
|
+
interface OpenAIChatCreateParams {
|
|
20758
|
+
messages: unknown;
|
|
20759
|
+
stream?: boolean | null;
|
|
20760
|
+
[key: string]: unknown;
|
|
20761
|
+
}
|
|
20762
|
+
interface OpenAIEmbeddingCreateParams {
|
|
20763
|
+
input: unknown;
|
|
20764
|
+
[key: string]: unknown;
|
|
20765
|
+
}
|
|
20766
|
+
interface OpenAIModerationCreateParams {
|
|
20767
|
+
input: unknown;
|
|
20768
|
+
[key: string]: unknown;
|
|
20687
20769
|
}
|
|
20688
|
-
interface
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20770
|
+
interface OpenAIResponseCreateParams {
|
|
20771
|
+
input?: unknown;
|
|
20772
|
+
stream?: boolean | null;
|
|
20773
|
+
[key: string]: unknown;
|
|
20774
|
+
}
|
|
20775
|
+
interface OpenAIUsage {
|
|
20776
|
+
total_tokens?: number;
|
|
20777
|
+
prompt_tokens?: number;
|
|
20778
|
+
completion_tokens?: number;
|
|
20779
|
+
input_tokens?: number;
|
|
20780
|
+
output_tokens?: number;
|
|
20781
|
+
cached?: number;
|
|
20782
|
+
input_tokens_details?: Record<string, number>;
|
|
20783
|
+
output_tokens_details?: Record<string, number>;
|
|
20784
|
+
[key: string]: number | Record<string, number> | undefined;
|
|
20785
|
+
}
|
|
20786
|
+
interface OpenAIChatToolFunction {
|
|
20787
|
+
arguments: string;
|
|
20788
|
+
name?: string;
|
|
20789
|
+
[key: string]: unknown;
|
|
20790
|
+
}
|
|
20791
|
+
interface OpenAIChatToolCall {
|
|
20792
|
+
id?: string;
|
|
20793
|
+
type?: string;
|
|
20794
|
+
function: OpenAIChatToolFunction;
|
|
20795
|
+
[key: string]: unknown;
|
|
20796
|
+
}
|
|
20797
|
+
interface OpenAIChatMessage {
|
|
20798
|
+
role?: string;
|
|
20799
|
+
content?: unknown;
|
|
20800
|
+
tool_calls?: OpenAIChatToolCall[];
|
|
20801
|
+
[key: string]: unknown;
|
|
20802
|
+
}
|
|
20803
|
+
interface OpenAIChatChoice {
|
|
20804
|
+
index: number;
|
|
20805
|
+
message: OpenAIChatMessage;
|
|
20806
|
+
finish_reason?: string | null;
|
|
20807
|
+
logprobs?: unknown;
|
|
20808
|
+
[key: string]: unknown;
|
|
20809
|
+
}
|
|
20810
|
+
interface OpenAIChatCompletion {
|
|
20811
|
+
choices: OpenAIChatChoice[];
|
|
20812
|
+
usage?: OpenAIUsage;
|
|
20813
|
+
[key: string]: unknown;
|
|
20814
|
+
}
|
|
20815
|
+
interface OpenAIChatDelta {
|
|
20816
|
+
role?: string;
|
|
20817
|
+
content?: string;
|
|
20818
|
+
tool_calls?: OpenAIChatToolCall[];
|
|
20819
|
+
finish_reason?: string | null;
|
|
20820
|
+
[key: string]: unknown;
|
|
20821
|
+
}
|
|
20822
|
+
interface OpenAIChatChunkChoice {
|
|
20823
|
+
delta?: OpenAIChatDelta;
|
|
20824
|
+
finish_reason?: string | null;
|
|
20825
|
+
[key: string]: unknown;
|
|
20826
|
+
}
|
|
20827
|
+
interface OpenAIChatCompletionChunk {
|
|
20828
|
+
choices?: OpenAIChatChunkChoice[];
|
|
20829
|
+
usage?: OpenAIUsage;
|
|
20830
|
+
[key: string]: unknown;
|
|
20831
|
+
}
|
|
20832
|
+
type OpenAIChatStream = AsyncIterable<OpenAIChatCompletionChunk>;
|
|
20833
|
+
interface OpenAIEmbeddingResponse {
|
|
20834
|
+
data?: Array<{
|
|
20835
|
+
embedding?: number[];
|
|
20836
|
+
[key: string]: unknown;
|
|
20837
|
+
}>;
|
|
20838
|
+
usage?: OpenAIUsage;
|
|
20839
|
+
[key: string]: unknown;
|
|
20840
|
+
}
|
|
20841
|
+
interface OpenAIModerationResponse {
|
|
20842
|
+
results?: unknown[];
|
|
20843
|
+
usage?: OpenAIUsage;
|
|
20844
|
+
[key: string]: unknown;
|
|
20845
|
+
}
|
|
20846
|
+
interface OpenAIResponse {
|
|
20847
|
+
output?: unknown;
|
|
20848
|
+
usage?: OpenAIUsage;
|
|
20849
|
+
[key: string]: unknown;
|
|
20694
20850
|
}
|
|
20851
|
+
interface OpenAIResponseCompletedEvent {
|
|
20852
|
+
type: "response.completed";
|
|
20853
|
+
response: OpenAIResponse;
|
|
20854
|
+
}
|
|
20855
|
+
type OpenAIResponseStreamEvent = OpenAIResponseCompletedEvent | {
|
|
20856
|
+
type: string;
|
|
20857
|
+
response?: OpenAIResponse;
|
|
20858
|
+
[key: string]: unknown;
|
|
20859
|
+
};
|
|
20860
|
+
type OpenAIResponseStream = AsyncIterable<OpenAIResponseStreamEvent>;
|
|
20861
|
+
interface OpenAISyncStream {
|
|
20862
|
+
[key: string]: unknown;
|
|
20863
|
+
}
|
|
20864
|
+
interface OpenAIChatCompletions {
|
|
20865
|
+
create: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion | OpenAIChatStream>;
|
|
20866
|
+
parse?: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion>;
|
|
20867
|
+
stream?: (params: OpenAIChatCreateParams, options?: unknown) => OpenAISyncStream;
|
|
20868
|
+
}
|
|
20869
|
+
interface OpenAIChatCompletionsWithParsing extends OpenAIChatCompletions {
|
|
20870
|
+
parse: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion>;
|
|
20871
|
+
stream: (params: OpenAIChatCreateParams, options?: unknown) => OpenAISyncStream;
|
|
20872
|
+
}
|
|
20873
|
+
interface OpenAIChat {
|
|
20874
|
+
completions: OpenAIChatCompletions;
|
|
20875
|
+
}
|
|
20876
|
+
interface OpenAIChatWithParsing {
|
|
20877
|
+
completions: OpenAIChatCompletionsWithParsing;
|
|
20878
|
+
}
|
|
20879
|
+
interface OpenAIBeta {
|
|
20880
|
+
chat: OpenAIChatWithParsing;
|
|
20881
|
+
}
|
|
20882
|
+
interface OpenAIEmbeddings {
|
|
20883
|
+
create: (params: OpenAIEmbeddingCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIEmbeddingResponse>;
|
|
20884
|
+
}
|
|
20885
|
+
interface OpenAIModerations {
|
|
20886
|
+
create: (params: OpenAIModerationCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIModerationResponse>;
|
|
20887
|
+
}
|
|
20888
|
+
interface OpenAIResponses {
|
|
20889
|
+
create: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse | OpenAIResponseStream>;
|
|
20890
|
+
parse?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse>;
|
|
20891
|
+
stream?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAISyncStream;
|
|
20892
|
+
}
|
|
20893
|
+
|
|
20894
|
+
interface OpenAIV4Client {
|
|
20895
|
+
chat: OpenAIChat;
|
|
20896
|
+
embeddings: OpenAIEmbeddings;
|
|
20897
|
+
moderations: OpenAIModerations;
|
|
20898
|
+
beta?: OpenAIBeta;
|
|
20899
|
+
responses?: OpenAIResponses;
|
|
20900
|
+
}
|
|
20901
|
+
|
|
20695
20902
|
declare global {
|
|
20696
20903
|
var __inherited_braintrust_wrap_openai: ((openai: any) => any) | undefined;
|
|
20697
20904
|
}
|
|
@@ -20700,16 +20907,14 @@ declare global {
|
|
|
20700
20907
|
* not configured, nothing will be traced. If this is not an `OpenAI` object, this function is
|
|
20701
20908
|
* a no-op.
|
|
20702
20909
|
*
|
|
20703
|
-
* Currently, this supports
|
|
20910
|
+
* Currently, this supports the `v4`, `v5`, and `v6` API.
|
|
20704
20911
|
*
|
|
20705
20912
|
* @param openai
|
|
20706
20913
|
* @returns The wrapped `OpenAI` object.
|
|
20707
20914
|
*/
|
|
20708
20915
|
declare function wrapOpenAI<T extends object>(openai: T): T;
|
|
20916
|
+
type OpenAILike = OpenAIV4Client;
|
|
20709
20917
|
declare function wrapOpenAIv4<T extends OpenAILike>(openai: T): T;
|
|
20710
|
-
declare const LEGACY_CACHED_HEADER = "x-cached";
|
|
20711
|
-
declare const X_CACHED_HEADER = "x-bt-cached";
|
|
20712
|
-
declare function parseCachedHeader(value: string | null | undefined): number | undefined;
|
|
20713
20918
|
|
|
20714
20919
|
interface WrapAISDKOptions {
|
|
20715
20920
|
denyOutputPaths?: string[];
|
|
@@ -20874,6 +21079,24 @@ type ScorerFunction<Output = unknown> = (args: {
|
|
|
20874
21079
|
input?: unknown;
|
|
20875
21080
|
metadata?: Record<string, unknown>;
|
|
20876
21081
|
}) => Score | Promise<Score> | number | null | Array<Score>;
|
|
21082
|
+
type ProgressEvent = {
|
|
21083
|
+
type: "suite_start";
|
|
21084
|
+
suiteName: string;
|
|
21085
|
+
} | {
|
|
21086
|
+
type: "test_start";
|
|
21087
|
+
testName: string;
|
|
21088
|
+
} | {
|
|
21089
|
+
type: "test_complete";
|
|
21090
|
+
testName: string;
|
|
21091
|
+
passed: boolean;
|
|
21092
|
+
duration: number;
|
|
21093
|
+
} | {
|
|
21094
|
+
type: "suite_complete";
|
|
21095
|
+
suiteName: string;
|
|
21096
|
+
passed: number;
|
|
21097
|
+
failed: number;
|
|
21098
|
+
};
|
|
21099
|
+
|
|
20877
21100
|
interface BraintrustTestConfig {
|
|
20878
21101
|
input?: unknown;
|
|
20879
21102
|
expected?: unknown;
|
|
@@ -20955,23 +21178,6 @@ interface BraintrustVitest<VitestContext = unknown, ExpectType extends (...args:
|
|
|
20955
21178
|
displaySummary?: boolean;
|
|
20956
21179
|
}) => Promise<void>;
|
|
20957
21180
|
}
|
|
20958
|
-
type ProgressEvent = {
|
|
20959
|
-
type: "suite_start";
|
|
20960
|
-
suiteName: string;
|
|
20961
|
-
} | {
|
|
20962
|
-
type: "test_start";
|
|
20963
|
-
testName: string;
|
|
20964
|
-
} | {
|
|
20965
|
-
type: "test_complete";
|
|
20966
|
-
testName: string;
|
|
20967
|
-
passed: boolean;
|
|
20968
|
-
duration: number;
|
|
20969
|
-
} | {
|
|
20970
|
-
type: "suite_complete";
|
|
20971
|
-
suiteName: string;
|
|
20972
|
-
passed: number;
|
|
20973
|
-
failed: number;
|
|
20974
|
-
};
|
|
20975
21181
|
interface WrapperConfig {
|
|
20976
21182
|
projectName?: string;
|
|
20977
21183
|
/**
|
|
@@ -21036,6 +21242,115 @@ interface WrapperConfig {
|
|
|
21036
21242
|
*/
|
|
21037
21243
|
declare function wrapVitest<VitestContext = unknown, ExpectType extends (...args: unknown[]) => unknown = (...args: unknown[]) => unknown>(vitestMethods: VitestMethods<VitestContext, ExpectType>, config?: WrapperConfig): BraintrustVitest<VitestContext, ExpectType>;
|
|
21038
21244
|
|
|
21245
|
+
/** Progress events emitted by the node-test integration. */
|
|
21246
|
+
type NodeTestProgressEvent = {
|
|
21247
|
+
type: "test_start";
|
|
21248
|
+
testName: string;
|
|
21249
|
+
} | {
|
|
21250
|
+
type: "test_complete";
|
|
21251
|
+
testName: string;
|
|
21252
|
+
passed: boolean;
|
|
21253
|
+
duration: number;
|
|
21254
|
+
};
|
|
21255
|
+
/**
|
|
21256
|
+
* Minimal test context interface compatible with node:test's TestContext.
|
|
21257
|
+
* We only use `name` from the context, making this compatible with any
|
|
21258
|
+
* test runner that provides a `{ name?: string }` context object.
|
|
21259
|
+
*/
|
|
21260
|
+
interface MinimalTestContext {
|
|
21261
|
+
name?: string;
|
|
21262
|
+
}
|
|
21263
|
+
/**
|
|
21264
|
+
* Configuration for `initNodeTestSuite()`.
|
|
21265
|
+
*/
|
|
21266
|
+
interface NodeTestSuiteConfig {
|
|
21267
|
+
/** Project name for the Braintrust experiment. */
|
|
21268
|
+
projectName: string;
|
|
21269
|
+
/** Optional experiment name. Defaults to a timestamp-based name. */
|
|
21270
|
+
experimentName?: string;
|
|
21271
|
+
/**
|
|
21272
|
+
* If true, displays a formatted experiment summary after flushing.
|
|
21273
|
+
* Defaults to true.
|
|
21274
|
+
*/
|
|
21275
|
+
displaySummary?: boolean;
|
|
21276
|
+
/**
|
|
21277
|
+
* Pass `after` from `node:test` to auto-register a flush hook.
|
|
21278
|
+
* When provided, `suite.flush()` is called automatically after all tests.
|
|
21279
|
+
*/
|
|
21280
|
+
after?: (fn: () => void | Promise<void>) => void;
|
|
21281
|
+
/**
|
|
21282
|
+
* Callback for real-time progress events.
|
|
21283
|
+
* Emits `test_start` and `test_complete` events.
|
|
21284
|
+
*/
|
|
21285
|
+
onProgress?: (event: NodeTestProgressEvent) => void;
|
|
21286
|
+
}
|
|
21287
|
+
/**
|
|
21288
|
+
* Configuration for a single eval test case.
|
|
21289
|
+
*/
|
|
21290
|
+
interface EvalConfig {
|
|
21291
|
+
/** Test input data, logged to the span. */
|
|
21292
|
+
input?: unknown;
|
|
21293
|
+
/** Expected output, passed to scorers. */
|
|
21294
|
+
expected?: unknown;
|
|
21295
|
+
/** Custom metadata, logged to the span. */
|
|
21296
|
+
metadata?: Record<string, unknown>;
|
|
21297
|
+
/** Tags for organizing test cases. */
|
|
21298
|
+
tags?: string[];
|
|
21299
|
+
/** Scorer functions to evaluate the output. */
|
|
21300
|
+
scorers?: ScorerFunction[];
|
|
21301
|
+
/** Override span name (defaults to `t.name`, then `"unnamed test"`). */
|
|
21302
|
+
name?: string;
|
|
21303
|
+
}
|
|
21304
|
+
/**
|
|
21305
|
+
* Context passed to the eval test function.
|
|
21306
|
+
*/
|
|
21307
|
+
interface EvalContext {
|
|
21308
|
+
input: unknown;
|
|
21309
|
+
expected?: unknown;
|
|
21310
|
+
metadata?: Record<string, unknown>;
|
|
21311
|
+
}
|
|
21312
|
+
/**
|
|
21313
|
+
* The public API surface returned by `initNodeTestSuite()`.
|
|
21314
|
+
*/
|
|
21315
|
+
interface NodeTestSuite {
|
|
21316
|
+
/**
|
|
21317
|
+
* Creates a test function compatible with `node:test`.
|
|
21318
|
+
* Pass the result to `test()` from `node:test`.
|
|
21319
|
+
*
|
|
21320
|
+
* @param config - Eval configuration (input, expected, scorers, etc.)
|
|
21321
|
+
* @param fn - The test function. Its return value is logged as output and passed to scorers.
|
|
21322
|
+
* @returns A function accepting a test context `t` from `node:test`.
|
|
21323
|
+
*/
|
|
21324
|
+
eval(config: EvalConfig, fn: (context: EvalContext) => unknown | Promise<unknown>): (t: MinimalTestContext) => Promise<void>;
|
|
21325
|
+
/**
|
|
21326
|
+
* Flush the experiment: summarize results and send data to Braintrust.
|
|
21327
|
+
* Called automatically if `after` was provided in the config.
|
|
21328
|
+
*/
|
|
21329
|
+
flush(): Promise<void>;
|
|
21330
|
+
}
|
|
21331
|
+
|
|
21332
|
+
/**
|
|
21333
|
+
* Creates a new Node.js test suite with Braintrust experiment tracking.
|
|
21334
|
+
*
|
|
21335
|
+
* @example
|
|
21336
|
+
* ```typescript
|
|
21337
|
+
* import { test, describe, after } from 'node:test';
|
|
21338
|
+
* import { initNodeTestSuite } from 'braintrust';
|
|
21339
|
+
*
|
|
21340
|
+
* describe('My Tests', () => {
|
|
21341
|
+
* const suite = initNodeTestSuite({ projectName: 'my-project', after });
|
|
21342
|
+
*
|
|
21343
|
+
* test('my eval', suite.eval(
|
|
21344
|
+
* { input: 'hello', expected: 'world', scorers: [myScorer] },
|
|
21345
|
+
* async ({ input }) => {
|
|
21346
|
+
* return await myFunction(input);
|
|
21347
|
+
* }
|
|
21348
|
+
* ));
|
|
21349
|
+
* });
|
|
21350
|
+
* ```
|
|
21351
|
+
*/
|
|
21352
|
+
declare function initNodeTestSuite(config: NodeTestSuiteConfig): NodeTestSuite;
|
|
21353
|
+
|
|
21039
21354
|
interface BuildContext {
|
|
21040
21355
|
getFunctionId(functionObj: unknown): Promise<FunctionIdType>;
|
|
21041
21356
|
}
|
|
@@ -21168,6 +21483,14 @@ declare namespace graphFramework {
|
|
|
21168
21483
|
}
|
|
21169
21484
|
|
|
21170
21485
|
type GenericFunction<Input, Output> = ((input: Input) => Output) | ((input: Input) => Promise<Output>);
|
|
21486
|
+
interface BaseFnOpts {
|
|
21487
|
+
name: string;
|
|
21488
|
+
slug: string;
|
|
21489
|
+
description: string;
|
|
21490
|
+
ifExists: IfExistsType;
|
|
21491
|
+
tags?: string[];
|
|
21492
|
+
metadata?: Record<string, unknown>;
|
|
21493
|
+
}
|
|
21171
21494
|
|
|
21172
21495
|
type SpanRecord = any;
|
|
21173
21496
|
/**
|
|
@@ -26581,6 +26904,18 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
26581
26904
|
enabled_tools?: string[] | null | undefined;
|
|
26582
26905
|
}> | null | undefined;
|
|
26583
26906
|
} | undefined;
|
|
26907
|
+
}>, z.ZodObject<{
|
|
26908
|
+
type: z.ZodLiteral<"model">;
|
|
26909
|
+
default: z.ZodOptional<z.ZodString>;
|
|
26910
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26911
|
+
}, "strip", z.ZodTypeAny, {
|
|
26912
|
+
type: "model";
|
|
26913
|
+
description?: string | undefined;
|
|
26914
|
+
default?: string | undefined;
|
|
26915
|
+
}, {
|
|
26916
|
+
type: "model";
|
|
26917
|
+
description?: string | undefined;
|
|
26918
|
+
default?: string | undefined;
|
|
26584
26919
|
}>, z.ZodObject<{
|
|
26585
26920
|
type: z.ZodLiteral<"data">;
|
|
26586
26921
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -28983,6 +29318,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
28983
29318
|
enabled_tools?: string[] | null | undefined;
|
|
28984
29319
|
}> | null | undefined;
|
|
28985
29320
|
} | undefined;
|
|
29321
|
+
}>, z.ZodObject<{
|
|
29322
|
+
type: z.ZodLiteral<"model">;
|
|
29323
|
+
default: z.ZodOptional<z.ZodString>;
|
|
29324
|
+
description: z.ZodOptional<z.ZodString>;
|
|
29325
|
+
}, "strip", z.ZodTypeAny, {
|
|
29326
|
+
type: "model";
|
|
29327
|
+
description?: string | undefined;
|
|
29328
|
+
default?: string | undefined;
|
|
29329
|
+
}, {
|
|
29330
|
+
type: "model";
|
|
29331
|
+
description?: string | undefined;
|
|
29332
|
+
default?: string | undefined;
|
|
28986
29333
|
}>, z.ZodObject<{
|
|
28987
29334
|
type: z.ZodLiteral<"data">;
|
|
28988
29335
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -29255,6 +29602,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
29255
29602
|
enabled_tools?: string[] | null | undefined;
|
|
29256
29603
|
}> | null | undefined;
|
|
29257
29604
|
} | undefined;
|
|
29605
|
+
} | {
|
|
29606
|
+
type: "model";
|
|
29607
|
+
description?: string | undefined;
|
|
29608
|
+
default?: string | undefined;
|
|
29258
29609
|
} | {
|
|
29259
29610
|
type: "data";
|
|
29260
29611
|
schema: Record<string, unknown>;
|
|
@@ -29517,6 +29868,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
29517
29868
|
enabled_tools?: string[] | null | undefined;
|
|
29518
29869
|
}> | null | undefined;
|
|
29519
29870
|
} | undefined;
|
|
29871
|
+
} | {
|
|
29872
|
+
type: "model";
|
|
29873
|
+
description?: string | undefined;
|
|
29874
|
+
default?: string | undefined;
|
|
29520
29875
|
} | {
|
|
29521
29876
|
type: "data";
|
|
29522
29877
|
schema: Record<string, unknown>;
|
|
@@ -31819,6 +32174,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
31819
32174
|
enabled_tools?: string[] | null | undefined;
|
|
31820
32175
|
}> | null | undefined;
|
|
31821
32176
|
} | undefined;
|
|
32177
|
+
}>, z.ZodObject<{
|
|
32178
|
+
type: z.ZodLiteral<"model">;
|
|
32179
|
+
default: z.ZodOptional<z.ZodString>;
|
|
32180
|
+
description: z.ZodOptional<z.ZodString>;
|
|
32181
|
+
}, "strip", z.ZodTypeAny, {
|
|
32182
|
+
type: "model";
|
|
32183
|
+
description?: string | undefined;
|
|
32184
|
+
default?: string | undefined;
|
|
32185
|
+
}, {
|
|
32186
|
+
type: "model";
|
|
32187
|
+
description?: string | undefined;
|
|
32188
|
+
default?: string | undefined;
|
|
31822
32189
|
}>, z.ZodObject<{
|
|
31823
32190
|
type: z.ZodLiteral<"data">;
|
|
31824
32191
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -32096,6 +32463,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32096
32463
|
enabled_tools?: string[] | null | undefined;
|
|
32097
32464
|
}> | null | undefined;
|
|
32098
32465
|
} | undefined;
|
|
32466
|
+
} | {
|
|
32467
|
+
type: "model";
|
|
32468
|
+
description?: string | undefined;
|
|
32469
|
+
default?: string | undefined;
|
|
32099
32470
|
} | {
|
|
32100
32471
|
type: "data";
|
|
32101
32472
|
schema: Record<string, unknown>;
|
|
@@ -32371,6 +32742,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32371
32742
|
enabled_tools?: string[] | null | undefined;
|
|
32372
32743
|
}> | null | undefined;
|
|
32373
32744
|
} | undefined;
|
|
32745
|
+
} | {
|
|
32746
|
+
type: "model";
|
|
32747
|
+
description?: string | undefined;
|
|
32748
|
+
default?: string | undefined;
|
|
32374
32749
|
} | {
|
|
32375
32750
|
type: "data";
|
|
32376
32751
|
schema: Record<string, unknown>;
|
|
@@ -32636,6 +33011,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32636
33011
|
enabled_tools?: string[] | null | undefined;
|
|
32637
33012
|
}> | null | undefined;
|
|
32638
33013
|
} | undefined;
|
|
33014
|
+
} | {
|
|
33015
|
+
type: "model";
|
|
33016
|
+
description?: string | undefined;
|
|
33017
|
+
default?: string | undefined;
|
|
32639
33018
|
} | {
|
|
32640
33019
|
type: "data";
|
|
32641
33020
|
schema: Record<string, unknown>;
|
|
@@ -32911,6 +33290,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32911
33290
|
enabled_tools?: string[] | null | undefined;
|
|
32912
33291
|
}> | null | undefined;
|
|
32913
33292
|
} | undefined;
|
|
33293
|
+
} | {
|
|
33294
|
+
type: "model";
|
|
33295
|
+
description?: string | undefined;
|
|
33296
|
+
default?: string | undefined;
|
|
32914
33297
|
} | {
|
|
32915
33298
|
type: "data";
|
|
32916
33299
|
schema: Record<string, unknown>;
|
|
@@ -35289,6 +35672,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
35289
35672
|
enabled_tools?: string[] | null | undefined;
|
|
35290
35673
|
}> | null | undefined;
|
|
35291
35674
|
} | undefined;
|
|
35675
|
+
}>, z.ZodObject<{
|
|
35676
|
+
type: z.ZodLiteral<"model">;
|
|
35677
|
+
default: z.ZodOptional<z.ZodString>;
|
|
35678
|
+
description: z.ZodOptional<z.ZodString>;
|
|
35679
|
+
}, "strip", z.ZodTypeAny, {
|
|
35680
|
+
type: "model";
|
|
35681
|
+
description?: string | undefined;
|
|
35682
|
+
default?: string | undefined;
|
|
35683
|
+
}, {
|
|
35684
|
+
type: "model";
|
|
35685
|
+
description?: string | undefined;
|
|
35686
|
+
default?: string | undefined;
|
|
35292
35687
|
}>, z.ZodObject<{
|
|
35293
35688
|
type: z.ZodLiteral<"data">;
|
|
35294
35689
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -35561,6 +35956,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
35561
35956
|
enabled_tools?: string[] | null | undefined;
|
|
35562
35957
|
}> | null | undefined;
|
|
35563
35958
|
} | undefined;
|
|
35959
|
+
} | {
|
|
35960
|
+
type: "model";
|
|
35961
|
+
description?: string | undefined;
|
|
35962
|
+
default?: string | undefined;
|
|
35564
35963
|
} | {
|
|
35565
35964
|
type: "data";
|
|
35566
35965
|
schema: Record<string, unknown>;
|
|
@@ -35823,6 +36222,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
35823
36222
|
enabled_tools?: string[] | null | undefined;
|
|
35824
36223
|
}> | null | undefined;
|
|
35825
36224
|
} | undefined;
|
|
36225
|
+
} | {
|
|
36226
|
+
type: "model";
|
|
36227
|
+
description?: string | undefined;
|
|
36228
|
+
default?: string | undefined;
|
|
35826
36229
|
} | {
|
|
35827
36230
|
type: "data";
|
|
35828
36231
|
schema: Record<string, unknown>;
|
|
@@ -38125,6 +38528,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
38125
38528
|
enabled_tools?: string[] | null | undefined;
|
|
38126
38529
|
}> | null | undefined;
|
|
38127
38530
|
} | undefined;
|
|
38531
|
+
}>, z.ZodObject<{
|
|
38532
|
+
type: z.ZodLiteral<"model">;
|
|
38533
|
+
default: z.ZodOptional<z.ZodString>;
|
|
38534
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38535
|
+
}, "strip", z.ZodTypeAny, {
|
|
38536
|
+
type: "model";
|
|
38537
|
+
description?: string | undefined;
|
|
38538
|
+
default?: string | undefined;
|
|
38539
|
+
}, {
|
|
38540
|
+
type: "model";
|
|
38541
|
+
description?: string | undefined;
|
|
38542
|
+
default?: string | undefined;
|
|
38128
38543
|
}>, z.ZodObject<{
|
|
38129
38544
|
type: z.ZodLiteral<"data">;
|
|
38130
38545
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -38402,6 +38817,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
38402
38817
|
enabled_tools?: string[] | null | undefined;
|
|
38403
38818
|
}> | null | undefined;
|
|
38404
38819
|
} | undefined;
|
|
38820
|
+
} | {
|
|
38821
|
+
type: "model";
|
|
38822
|
+
description?: string | undefined;
|
|
38823
|
+
default?: string | undefined;
|
|
38405
38824
|
} | {
|
|
38406
38825
|
type: "data";
|
|
38407
38826
|
schema: Record<string, unknown>;
|
|
@@ -38677,6 +39096,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
38677
39096
|
enabled_tools?: string[] | null | undefined;
|
|
38678
39097
|
}> | null | undefined;
|
|
38679
39098
|
} | undefined;
|
|
39099
|
+
} | {
|
|
39100
|
+
type: "model";
|
|
39101
|
+
description?: string | undefined;
|
|
39102
|
+
default?: string | undefined;
|
|
38680
39103
|
} | {
|
|
38681
39104
|
type: "data";
|
|
38682
39105
|
schema: Record<string, unknown>;
|
|
@@ -38942,6 +39365,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
38942
39365
|
enabled_tools?: string[] | null | undefined;
|
|
38943
39366
|
}> | null | undefined;
|
|
38944
39367
|
} | undefined;
|
|
39368
|
+
} | {
|
|
39369
|
+
type: "model";
|
|
39370
|
+
description?: string | undefined;
|
|
39371
|
+
default?: string | undefined;
|
|
38945
39372
|
} | {
|
|
38946
39373
|
type: "data";
|
|
38947
39374
|
schema: Record<string, unknown>;
|
|
@@ -39217,6 +39644,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39217
39644
|
enabled_tools?: string[] | null | undefined;
|
|
39218
39645
|
}> | null | undefined;
|
|
39219
39646
|
} | undefined;
|
|
39647
|
+
} | {
|
|
39648
|
+
type: "model";
|
|
39649
|
+
description?: string | undefined;
|
|
39650
|
+
default?: string | undefined;
|
|
39220
39651
|
} | {
|
|
39221
39652
|
type: "data";
|
|
39222
39653
|
schema: Record<string, unknown>;
|
|
@@ -39231,14 +39662,6 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39231
39662
|
}>>;
|
|
39232
39663
|
type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
|
|
39233
39664
|
|
|
39234
|
-
interface BaseFnOpts {
|
|
39235
|
-
name: string;
|
|
39236
|
-
slug: string;
|
|
39237
|
-
description: string;
|
|
39238
|
-
ifExists: IfExistsType;
|
|
39239
|
-
metadata?: Record<string, unknown>;
|
|
39240
|
-
}
|
|
39241
|
-
|
|
39242
39665
|
type NameOrId = {
|
|
39243
39666
|
name: string;
|
|
39244
39667
|
} | {
|
|
@@ -39329,6 +39752,7 @@ declare class CodeFunction<Input, Output, Fn extends GenericFunction<Input, Outp
|
|
|
39329
39752
|
readonly parameters?: z.ZodSchema<Input>;
|
|
39330
39753
|
readonly returns?: z.ZodSchema<Output>;
|
|
39331
39754
|
readonly ifExists?: IfExistsType;
|
|
39755
|
+
readonly tags?: string[];
|
|
39332
39756
|
readonly metadata?: Record<string, unknown>;
|
|
39333
39757
|
constructor(project: Project, opts: Omit<CodeOpts<Input, Output, Fn>, "name" | "slug"> & {
|
|
39334
39758
|
name: string;
|
|
@@ -39348,6 +39772,7 @@ declare class CodePrompt {
|
|
|
39348
39772
|
readonly id?: string;
|
|
39349
39773
|
readonly functionType?: FunctionTypeEnumType;
|
|
39350
39774
|
readonly toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[];
|
|
39775
|
+
readonly tags?: string[];
|
|
39351
39776
|
readonly metadata?: Record<string, unknown>;
|
|
39352
39777
|
constructor(project: Project, prompt: PromptDataType, toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[], opts: Omit<PromptOpts<false, false, false, false>, "name" | "slug"> & {
|
|
39353
39778
|
name: string;
|
|
@@ -39415,6 +39840,7 @@ interface FunctionEvent {
|
|
|
39415
39840
|
function_data: z.infer<typeof FunctionData>;
|
|
39416
39841
|
function_type?: FunctionTypeEnumType;
|
|
39417
39842
|
if_exists?: IfExistsType;
|
|
39843
|
+
tags?: string[];
|
|
39418
39844
|
metadata?: Record<string, unknown>;
|
|
39419
39845
|
}
|
|
39420
39846
|
declare class ProjectNameIdMap {
|
|
@@ -40016,6 +40442,7 @@ declare const _exports_initDataset: typeof initDataset;
|
|
|
40016
40442
|
declare const _exports_initExperiment: typeof initExperiment;
|
|
40017
40443
|
declare const _exports_initFunction: typeof initFunction;
|
|
40018
40444
|
declare const _exports_initLogger: typeof initLogger;
|
|
40445
|
+
declare const _exports_initNodeTestSuite: typeof initNodeTestSuite;
|
|
40019
40446
|
declare const _exports_invoke: typeof invoke;
|
|
40020
40447
|
declare const _exports_isTemplateFormat: typeof isTemplateFormat;
|
|
40021
40448
|
declare const _exports_loadParameters: typeof loadParameters;
|
|
@@ -40071,7 +40498,7 @@ declare const _exports_wrapOpenAIv4: typeof wrapOpenAIv4;
|
|
|
40071
40498
|
declare const _exports_wrapTraced: typeof wrapTraced;
|
|
40072
40499
|
declare const _exports_wrapVitest: typeof wrapVitest;
|
|
40073
40500
|
declare namespace _exports {
|
|
40074
|
-
export { type _exports_AnyDataset as AnyDataset, _exports_Attachment as Attachment, type _exports_AttachmentParams as AttachmentParams, _exports_AttachmentReference as AttachmentReference, 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, _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_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_wrapOpenAI as wrapOpenAI, _exports_wrapOpenAIv4 as wrapOpenAIv4, _exports_wrapTraced as wrapTraced, _exports_wrapVitest as wrapVitest };
|
|
40501
|
+
export { type _exports_AnyDataset as AnyDataset, _exports_Attachment as Attachment, type _exports_AttachmentParams as AttachmentParams, _exports_AttachmentReference as AttachmentReference, 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, _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_wrapOpenAI as wrapOpenAI, _exports_wrapOpenAIv4 as wrapOpenAIv4, _exports_wrapTraced as wrapTraced, _exports_wrapVitest as wrapVitest };
|
|
40075
40502
|
}
|
|
40076
40503
|
|
|
40077
|
-
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, 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, 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, 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, wrapOpenAI, wrapOpenAIv4, wrapTraced, wrapVitest };
|
|
40504
|
+
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, 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, 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, wrapOpenAI, wrapOpenAIv4, wrapTraced, wrapVitest };
|