braintrust 0.1.1 → 0.2.1
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 +26 -24
- package/dev/dist/index.d.ts +26 -24
- package/dev/dist/index.js +34 -14
- package/dev/dist/index.mjs +34 -14
- package/dist/browser.d.mts +80 -76
- package/dist/browser.d.ts +80 -76
- package/dist/browser.js +20 -5
- package/dist/browser.mjs +20 -5
- package/dist/{chunk-WEZHHYVU.js → chunk-CDBUTZMH.js} +94 -94
- package/dist/chunk-NB5AEJPK.mjs +19 -0
- package/dist/{chunk-K3GLD6I7.js → chunk-VKR7HDRS.js} +4 -4
- package/dist/{chunk-64O3VXT4.mjs → chunk-WKBXJQ57.mjs} +94 -94
- package/dist/cli.js +95 -73
- package/dist/getMachineId-bsd-7YM2UMB4.js +37 -0
- package/dist/{getMachineId-bsd-232NBLGZ.mjs → getMachineId-bsd-L7QQYES7.mjs} +4 -4
- package/dist/getMachineId-darwin-QV3NVG7H.js +37 -0
- package/dist/{getMachineId-darwin-C7F2HXMI.mjs → getMachineId-darwin-YXDFFCXM.mjs} +4 -4
- package/dist/getMachineId-linux-HKJ2YLJC.js +29 -0
- package/dist/{getMachineId-linux-VLB6DDHP.mjs → getMachineId-linux-LWEEVKPU.mjs} +3 -3
- package/dist/getMachineId-unsupported-EGJSIDYQ.mjs +20 -0
- package/dist/getMachineId-unsupported-TX34Q66M.js +20 -0
- package/dist/{getMachineId-win-4OSXYWMY.js → getMachineId-win-M5YW2KGK.js} +9 -9
- package/dist/{getMachineId-win-U7W7AAJX.mjs → getMachineId-win-UDA4B6X2.mjs} +4 -4
- package/dist/index.d.mts +212 -98
- package/dist/index.d.ts +212 -98
- package/dist/index.js +783 -465
- package/dist/index.mjs +596 -278
- package/package.json +7 -5
- package/dist/chunk-C527YOOG.mjs +0 -19
- package/dist/getMachineId-bsd-BCB626OV.js +0 -37
- package/dist/getMachineId-darwin-TV4MHNE6.js +0 -37
- package/dist/getMachineId-linux-RTVYWQL7.js +0 -29
- package/dist/getMachineId-unsupported-7RHYOLDR.js +0 -20
- package/dist/getMachineId-unsupported-IF5IGKUD.mjs +0 -20
package/dist/index.d.ts
CHANGED
|
@@ -191,8 +191,6 @@ declare class LazyValue<T> {
|
|
|
191
191
|
get hasSucceeded(): boolean;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
/// <reference lib="dom" />
|
|
195
|
-
|
|
196
194
|
type SetCurrentArg = {
|
|
197
195
|
setCurrent?: boolean;
|
|
198
196
|
};
|
|
@@ -385,10 +383,10 @@ declare const loginSchema: z.ZodObject<{
|
|
|
385
383
|
fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["dirty", "tag", "commit", "branch", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>, "many">>;
|
|
386
384
|
}, "strict", z.ZodTypeAny, {
|
|
387
385
|
collect: "some" | "none" | "all";
|
|
388
|
-
fields?: ("
|
|
386
|
+
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
389
387
|
}, {
|
|
390
388
|
collect: "some" | "none" | "all";
|
|
391
|
-
fields?: ("
|
|
389
|
+
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
392
390
|
}>>>;
|
|
393
391
|
}, "strict", z.ZodTypeAny, {
|
|
394
392
|
appUrl: string;
|
|
@@ -400,7 +398,7 @@ declare const loginSchema: z.ZodObject<{
|
|
|
400
398
|
orgId?: string | null | undefined;
|
|
401
399
|
gitMetadataSettings?: {
|
|
402
400
|
collect: "some" | "none" | "all";
|
|
403
|
-
fields?: ("
|
|
401
|
+
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
404
402
|
} | null | undefined;
|
|
405
403
|
}, {
|
|
406
404
|
appUrl: string;
|
|
@@ -412,7 +410,7 @@ declare const loginSchema: z.ZodObject<{
|
|
|
412
410
|
orgId?: string | null | undefined;
|
|
413
411
|
gitMetadataSettings?: {
|
|
414
412
|
collect: "some" | "none" | "all";
|
|
415
|
-
fields?: ("
|
|
413
|
+
fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
|
|
416
414
|
} | null | undefined;
|
|
417
415
|
}>;
|
|
418
416
|
type SerializedBraintrustState = z.infer<typeof loginSchema>;
|
|
@@ -575,7 +573,7 @@ declare class Attachment extends BaseAttachment {
|
|
|
575
573
|
* @returns The attachment status.
|
|
576
574
|
*/
|
|
577
575
|
upload(): Promise<{
|
|
578
|
-
upload_status: "
|
|
576
|
+
upload_status: "uploading" | "done" | "error";
|
|
579
577
|
error_message?: string | undefined;
|
|
580
578
|
}>;
|
|
581
579
|
/**
|
|
@@ -651,21 +649,21 @@ declare const attachmentMetadataSchema: z.ZodObject<{
|
|
|
651
649
|
upload_status: z.ZodEnum<["uploading", "done", "error"]>;
|
|
652
650
|
error_message: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
653
651
|
}, "strip", z.ZodTypeAny, {
|
|
654
|
-
upload_status: "
|
|
652
|
+
upload_status: "uploading" | "done" | "error";
|
|
655
653
|
error_message?: string | undefined;
|
|
656
654
|
}, {
|
|
657
|
-
upload_status: "
|
|
655
|
+
upload_status: "uploading" | "done" | "error";
|
|
658
656
|
error_message?: string | null | undefined;
|
|
659
657
|
}>;
|
|
660
658
|
}, "strip", z.ZodTypeAny, {
|
|
661
659
|
status: {
|
|
662
|
-
upload_status: "
|
|
660
|
+
upload_status: "uploading" | "done" | "error";
|
|
663
661
|
error_message?: string | undefined;
|
|
664
662
|
};
|
|
665
663
|
downloadUrl: string;
|
|
666
664
|
}, {
|
|
667
665
|
status: {
|
|
668
|
-
upload_status: "
|
|
666
|
+
upload_status: "uploading" | "done" | "error";
|
|
669
667
|
error_message?: string | null | undefined;
|
|
670
668
|
};
|
|
671
669
|
downloadUrl: string;
|
|
@@ -1693,6 +1691,7 @@ interface DatasetSummary {
|
|
|
1693
1691
|
datasetUrl: string;
|
|
1694
1692
|
dataSummary: DataSummary | undefined;
|
|
1695
1693
|
}
|
|
1694
|
+
declare function setInitialTestState(): void;
|
|
1696
1695
|
declare function simulateLoginForTests(): Promise<BraintrustState>;
|
|
1697
1696
|
declare function simulateLogoutForTests(): BraintrustState;
|
|
1698
1697
|
declare const _exportsForTestingOnly: {
|
|
@@ -1702,6 +1701,7 @@ declare const _exportsForTestingOnly: {
|
|
|
1702
1701
|
clearTestBackgroundLogger: typeof clearTestBackgroundLogger;
|
|
1703
1702
|
simulateLoginForTests: typeof simulateLoginForTests;
|
|
1704
1703
|
simulateLogoutForTests: typeof simulateLogoutForTests;
|
|
1704
|
+
setInitialTestState: typeof setInitialTestState;
|
|
1705
1705
|
};
|
|
1706
1706
|
|
|
1707
1707
|
declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
@@ -1776,13 +1776,13 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1776
1776
|
_xact_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1777
1777
|
created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1778
1778
|
}, "strip", z.ZodTypeAny, {
|
|
1779
|
-
object_type: "function" | "
|
|
1779
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1780
1780
|
object_id: string;
|
|
1781
1781
|
id: string;
|
|
1782
1782
|
_xact_id?: string | null | undefined;
|
|
1783
1783
|
created?: string | null | undefined;
|
|
1784
1784
|
}, {
|
|
1785
|
-
object_type: "function" | "
|
|
1785
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1786
1786
|
object_id: string;
|
|
1787
1787
|
id: string;
|
|
1788
1788
|
_xact_id?: string | null | undefined;
|
|
@@ -1799,10 +1799,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1799
1799
|
object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
|
|
1800
1800
|
id: string;
|
|
1801
1801
|
data: string;
|
|
1802
|
-
event: "
|
|
1802
|
+
event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
|
|
1803
1803
|
output_type: "completion" | "score" | "any";
|
|
1804
1804
|
origin?: {
|
|
1805
|
-
object_type: "function" | "
|
|
1805
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1806
1806
|
object_id: string;
|
|
1807
1807
|
id: string;
|
|
1808
1808
|
_xact_id?: string | null | undefined;
|
|
@@ -1814,10 +1814,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1814
1814
|
object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
|
|
1815
1815
|
id: string;
|
|
1816
1816
|
data: string;
|
|
1817
|
-
event: "
|
|
1817
|
+
event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
|
|
1818
1818
|
output_type: "completion" | "score" | "any";
|
|
1819
1819
|
origin?: {
|
|
1820
|
-
object_type: "function" | "
|
|
1820
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1821
1821
|
object_id: string;
|
|
1822
1822
|
id: string;
|
|
1823
1823
|
_xact_id?: string | null | undefined;
|
|
@@ -1832,10 +1832,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1832
1832
|
object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
|
|
1833
1833
|
id: string;
|
|
1834
1834
|
data: string;
|
|
1835
|
-
event: "
|
|
1835
|
+
event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
|
|
1836
1836
|
output_type: "completion" | "score" | "any";
|
|
1837
1837
|
origin?: {
|
|
1838
|
-
object_type: "function" | "
|
|
1838
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1839
1839
|
object_id: string;
|
|
1840
1840
|
id: string;
|
|
1841
1841
|
_xact_id?: string | null | undefined;
|
|
@@ -1850,10 +1850,10 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1850
1850
|
object_type: "prompt" | "tool" | "scorer" | "task" | "agent";
|
|
1851
1851
|
id: string;
|
|
1852
1852
|
data: string;
|
|
1853
|
-
event: "
|
|
1853
|
+
event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
|
|
1854
1854
|
output_type: "completion" | "score" | "any";
|
|
1855
1855
|
origin?: {
|
|
1856
|
-
object_type: "function" | "
|
|
1856
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1857
1857
|
object_id: string;
|
|
1858
1858
|
id: string;
|
|
1859
1859
|
_xact_id?: string | null | undefined;
|
|
@@ -2294,23 +2294,23 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2294
2294
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
|
|
2295
2295
|
}, "strip", z.ZodTypeAny, {
|
|
2296
2296
|
url: string;
|
|
2297
|
-
detail?: "auto" | "
|
|
2297
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2298
2298
|
}, {
|
|
2299
2299
|
url?: unknown;
|
|
2300
|
-
detail?: "auto" | "
|
|
2300
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2301
2301
|
}>;
|
|
2302
2302
|
type: z.ZodLiteral<"image_url">;
|
|
2303
2303
|
}, "strip", z.ZodTypeAny, {
|
|
2304
2304
|
type: "image_url";
|
|
2305
2305
|
image_url: {
|
|
2306
2306
|
url: string;
|
|
2307
|
-
detail?: "auto" | "
|
|
2307
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2308
2308
|
};
|
|
2309
2309
|
}, {
|
|
2310
2310
|
type: "image_url";
|
|
2311
2311
|
image_url: {
|
|
2312
2312
|
url?: unknown;
|
|
2313
|
-
detail?: "auto" | "
|
|
2313
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2314
2314
|
};
|
|
2315
2315
|
}>]>, "many">]>;
|
|
2316
2316
|
role: z.ZodLiteral<"user">;
|
|
@@ -2326,7 +2326,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2326
2326
|
type: "image_url";
|
|
2327
2327
|
image_url: {
|
|
2328
2328
|
url: string;
|
|
2329
|
-
detail?: "auto" | "
|
|
2329
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2330
2330
|
};
|
|
2331
2331
|
})[];
|
|
2332
2332
|
role: "user";
|
|
@@ -2344,7 +2344,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2344
2344
|
type: "image_url";
|
|
2345
2345
|
image_url: {
|
|
2346
2346
|
url?: unknown;
|
|
2347
|
-
detail?: "auto" | "
|
|
2347
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2348
2348
|
};
|
|
2349
2349
|
})[] | undefined;
|
|
2350
2350
|
}>, z.ZodObject<{
|
|
@@ -2635,7 +2635,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2635
2635
|
type: "image_url";
|
|
2636
2636
|
image_url: {
|
|
2637
2637
|
url: string;
|
|
2638
|
-
detail?: "auto" | "
|
|
2638
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2639
2639
|
};
|
|
2640
2640
|
})[];
|
|
2641
2641
|
role: "user";
|
|
@@ -2718,7 +2718,7 @@ declare const promptContentsSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
2718
2718
|
type: "image_url";
|
|
2719
2719
|
image_url: {
|
|
2720
2720
|
url?: unknown;
|
|
2721
|
-
detail?: "auto" | "
|
|
2721
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2722
2722
|
};
|
|
2723
2723
|
})[] | undefined;
|
|
2724
2724
|
} | {
|
|
@@ -2859,23 +2859,23 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
2859
2859
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
|
|
2860
2860
|
}, "strip", z.ZodTypeAny, {
|
|
2861
2861
|
url: string;
|
|
2862
|
-
detail?: "auto" | "
|
|
2862
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2863
2863
|
}, {
|
|
2864
2864
|
url?: unknown;
|
|
2865
|
-
detail?: "auto" | "
|
|
2865
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2866
2866
|
}>;
|
|
2867
2867
|
type: z.ZodLiteral<"image_url">;
|
|
2868
2868
|
}, "strip", z.ZodTypeAny, {
|
|
2869
2869
|
type: "image_url";
|
|
2870
2870
|
image_url: {
|
|
2871
2871
|
url: string;
|
|
2872
|
-
detail?: "auto" | "
|
|
2872
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2873
2873
|
};
|
|
2874
2874
|
}, {
|
|
2875
2875
|
type: "image_url";
|
|
2876
2876
|
image_url: {
|
|
2877
2877
|
url?: unknown;
|
|
2878
|
-
detail?: "auto" | "
|
|
2878
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2879
2879
|
};
|
|
2880
2880
|
}>]>, "many">]>;
|
|
2881
2881
|
role: z.ZodLiteral<"user">;
|
|
@@ -2891,7 +2891,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
2891
2891
|
type: "image_url";
|
|
2892
2892
|
image_url: {
|
|
2893
2893
|
url: string;
|
|
2894
|
-
detail?: "auto" | "
|
|
2894
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2895
2895
|
};
|
|
2896
2896
|
})[];
|
|
2897
2897
|
role: "user";
|
|
@@ -2909,7 +2909,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
2909
2909
|
type: "image_url";
|
|
2910
2910
|
image_url: {
|
|
2911
2911
|
url?: unknown;
|
|
2912
|
-
detail?: "auto" | "
|
|
2912
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
2913
2913
|
};
|
|
2914
2914
|
})[] | undefined;
|
|
2915
2915
|
}>, z.ZodObject<{
|
|
@@ -3200,7 +3200,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
3200
3200
|
type: "image_url";
|
|
3201
3201
|
image_url: {
|
|
3202
3202
|
url: string;
|
|
3203
|
-
detail?: "auto" | "
|
|
3203
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
3204
3204
|
};
|
|
3205
3205
|
})[];
|
|
3206
3206
|
role: "user";
|
|
@@ -3283,7 +3283,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
|
|
|
3283
3283
|
type: "image_url";
|
|
3284
3284
|
image_url: {
|
|
3285
3285
|
url?: unknown;
|
|
3286
|
-
detail?: "auto" | "
|
|
3286
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
3287
3287
|
};
|
|
3288
3288
|
})[] | undefined;
|
|
3289
3289
|
} | {
|
|
@@ -3978,23 +3978,23 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
|
|
|
3978
3978
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
|
|
3979
3979
|
}, "strip", z.ZodTypeAny, {
|
|
3980
3980
|
url: string;
|
|
3981
|
-
detail?: "auto" | "
|
|
3981
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
3982
3982
|
}, {
|
|
3983
3983
|
url?: unknown;
|
|
3984
|
-
detail?: "auto" | "
|
|
3984
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
3985
3985
|
}>;
|
|
3986
3986
|
type: z.ZodLiteral<"image_url">;
|
|
3987
3987
|
}, "strip", z.ZodTypeAny, {
|
|
3988
3988
|
type: "image_url";
|
|
3989
3989
|
image_url: {
|
|
3990
3990
|
url: string;
|
|
3991
|
-
detail?: "auto" | "
|
|
3991
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
3992
3992
|
};
|
|
3993
3993
|
}, {
|
|
3994
3994
|
type: "image_url";
|
|
3995
3995
|
image_url: {
|
|
3996
3996
|
url?: unknown;
|
|
3997
|
-
detail?: "auto" | "
|
|
3997
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
3998
3998
|
};
|
|
3999
3999
|
}>]>, "many">]>;
|
|
4000
4000
|
role: z.ZodLiteral<"user">;
|
|
@@ -4010,7 +4010,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
|
|
|
4010
4010
|
type: "image_url";
|
|
4011
4011
|
image_url: {
|
|
4012
4012
|
url: string;
|
|
4013
|
-
detail?: "auto" | "
|
|
4013
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
4014
4014
|
};
|
|
4015
4015
|
})[];
|
|
4016
4016
|
role: "user";
|
|
@@ -4028,7 +4028,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
|
|
|
4028
4028
|
type: "image_url";
|
|
4029
4029
|
image_url: {
|
|
4030
4030
|
url?: unknown;
|
|
4031
|
-
detail?: "auto" | "
|
|
4031
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
4032
4032
|
};
|
|
4033
4033
|
})[] | undefined;
|
|
4034
4034
|
}>, z.ZodObject<{
|
|
@@ -4319,7 +4319,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
|
|
|
4319
4319
|
type: "image_url";
|
|
4320
4320
|
image_url: {
|
|
4321
4321
|
url: string;
|
|
4322
|
-
detail?: "auto" | "
|
|
4322
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
4323
4323
|
};
|
|
4324
4324
|
})[];
|
|
4325
4325
|
role: "user";
|
|
@@ -4402,7 +4402,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
|
|
|
4402
4402
|
type: "image_url";
|
|
4403
4403
|
image_url: {
|
|
4404
4404
|
url?: unknown;
|
|
4405
|
-
detail?: "auto" | "
|
|
4405
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
4406
4406
|
};
|
|
4407
4407
|
})[] | undefined;
|
|
4408
4408
|
} | {
|
|
@@ -5188,23 +5188,23 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
5188
5188
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
|
|
5189
5189
|
}, "strip", z.ZodTypeAny, {
|
|
5190
5190
|
url: string;
|
|
5191
|
-
detail?: "auto" | "
|
|
5191
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5192
5192
|
}, {
|
|
5193
5193
|
url?: unknown;
|
|
5194
|
-
detail?: "auto" | "
|
|
5194
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5195
5195
|
}>;
|
|
5196
5196
|
type: z.ZodLiteral<"image_url">;
|
|
5197
5197
|
}, "strip", z.ZodTypeAny, {
|
|
5198
5198
|
type: "image_url";
|
|
5199
5199
|
image_url: {
|
|
5200
5200
|
url: string;
|
|
5201
|
-
detail?: "auto" | "
|
|
5201
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5202
5202
|
};
|
|
5203
5203
|
}, {
|
|
5204
5204
|
type: "image_url";
|
|
5205
5205
|
image_url: {
|
|
5206
5206
|
url?: unknown;
|
|
5207
|
-
detail?: "auto" | "
|
|
5207
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5208
5208
|
};
|
|
5209
5209
|
}>]>, "many">]>;
|
|
5210
5210
|
role: z.ZodLiteral<"user">;
|
|
@@ -5220,7 +5220,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
5220
5220
|
type: "image_url";
|
|
5221
5221
|
image_url: {
|
|
5222
5222
|
url: string;
|
|
5223
|
-
detail?: "auto" | "
|
|
5223
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5224
5224
|
};
|
|
5225
5225
|
})[];
|
|
5226
5226
|
role: "user";
|
|
@@ -5238,7 +5238,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
5238
5238
|
type: "image_url";
|
|
5239
5239
|
image_url: {
|
|
5240
5240
|
url?: unknown;
|
|
5241
|
-
detail?: "auto" | "
|
|
5241
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5242
5242
|
};
|
|
5243
5243
|
})[] | undefined;
|
|
5244
5244
|
}>, z.ZodObject<{
|
|
@@ -5529,7 +5529,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
5529
5529
|
type: "image_url";
|
|
5530
5530
|
image_url: {
|
|
5531
5531
|
url: string;
|
|
5532
|
-
detail?: "auto" | "
|
|
5532
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5533
5533
|
};
|
|
5534
5534
|
})[];
|
|
5535
5535
|
role: "user";
|
|
@@ -5612,7 +5612,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
5612
5612
|
type: "image_url";
|
|
5613
5613
|
image_url: {
|
|
5614
5614
|
url?: unknown;
|
|
5615
|
-
detail?: "auto" | "
|
|
5615
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
5616
5616
|
};
|
|
5617
5617
|
})[] | undefined;
|
|
5618
5618
|
} | {
|
|
@@ -6307,7 +6307,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
6307
6307
|
type: "image_url";
|
|
6308
6308
|
image_url: {
|
|
6309
6309
|
url: string;
|
|
6310
|
-
detail?: "auto" | "
|
|
6310
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
6311
6311
|
};
|
|
6312
6312
|
})[];
|
|
6313
6313
|
role: "user";
|
|
@@ -6518,7 +6518,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
|
|
|
6518
6518
|
type: "image_url";
|
|
6519
6519
|
image_url: {
|
|
6520
6520
|
url?: unknown;
|
|
6521
|
-
detail?: "auto" | "
|
|
6521
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
6522
6522
|
};
|
|
6523
6523
|
})[] | undefined;
|
|
6524
6524
|
} | {
|
|
@@ -6755,6 +6755,10 @@ interface EvalHooks<Expected, Metadata extends BaseMetadata, Parameters extends
|
|
|
6755
6755
|
* Report progress that will show up in the playground.
|
|
6756
6756
|
*/
|
|
6757
6757
|
reportProgress: (progress: TaskProgressEvent) => void;
|
|
6758
|
+
/**
|
|
6759
|
+
* The index of the current trial (0-based). This is useful when trialCount > 1.
|
|
6760
|
+
*/
|
|
6761
|
+
trialIndex: number;
|
|
6758
6762
|
}
|
|
6759
6763
|
type EvalScorerArgs<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalCase<Input, Expected, Metadata> & {
|
|
6760
6764
|
output: Output;
|
|
@@ -7132,7 +7136,7 @@ declare global {
|
|
|
7132
7136
|
* not configured, nothing will be traced. If this is not an `OpenAI` object, this function is
|
|
7133
7137
|
* a no-op.
|
|
7134
7138
|
*
|
|
7135
|
-
* Currently, this
|
|
7139
|
+
* Currently, this supports both the `v4` and `v5` API.
|
|
7136
7140
|
*
|
|
7137
7141
|
* @param openai
|
|
7138
7142
|
* @returns The wrapped `OpenAI` object.
|
|
@@ -7143,6 +7147,50 @@ declare const LEGACY_CACHED_HEADER = "x-cached";
|
|
|
7143
7147
|
declare const X_CACHED_HEADER = "x-bt-cached";
|
|
7144
7148
|
declare function parseCachedHeader(value: string | null | undefined): number | undefined;
|
|
7145
7149
|
|
|
7150
|
+
interface LanguageModelV2Middleware<TModel = any, TCallOptions = any> {
|
|
7151
|
+
wrapGenerate?: (options: {
|
|
7152
|
+
doGenerate: () => any;
|
|
7153
|
+
doStream: () => any;
|
|
7154
|
+
params: TCallOptions;
|
|
7155
|
+
model: TModel;
|
|
7156
|
+
}) => Promise<any>;
|
|
7157
|
+
wrapStream?: (options: {
|
|
7158
|
+
doGenerate: () => any;
|
|
7159
|
+
doStream: () => any;
|
|
7160
|
+
params: TCallOptions;
|
|
7161
|
+
model: TModel;
|
|
7162
|
+
}) => Promise<any>;
|
|
7163
|
+
}
|
|
7164
|
+
/**
|
|
7165
|
+
* Configuration options for the AI SDK middleware
|
|
7166
|
+
*/
|
|
7167
|
+
interface MiddlewareConfig {
|
|
7168
|
+
/** Enable debug logging */
|
|
7169
|
+
debug?: boolean;
|
|
7170
|
+
/** Name identifier for the middleware instance */
|
|
7171
|
+
name?: string;
|
|
7172
|
+
}
|
|
7173
|
+
/**
|
|
7174
|
+
* Creates a Braintrust middleware for AI SDK v2 that automatically traces
|
|
7175
|
+
* generateText and streamText calls with comprehensive metadata and metrics.
|
|
7176
|
+
*
|
|
7177
|
+
* @param config - Configuration options for the middleware
|
|
7178
|
+
* @returns A middleware object compatible with AI SDK v2's wrapLanguageModel
|
|
7179
|
+
*
|
|
7180
|
+
* @example
|
|
7181
|
+
* ```typescript
|
|
7182
|
+
* import { wrapLanguageModel } from "ai";
|
|
7183
|
+
* import { openai } from "@ai-sdk/openai";
|
|
7184
|
+
* import { BraintrustMiddleware } from "braintrust";
|
|
7185
|
+
*
|
|
7186
|
+
* const model = wrapLanguageModel({
|
|
7187
|
+
* model: openai("gpt-4"),
|
|
7188
|
+
* middleware: BraintrustMiddleware({ debug: true, name: "MyMiddleware" })
|
|
7189
|
+
* });
|
|
7190
|
+
* ```
|
|
7191
|
+
*/
|
|
7192
|
+
declare function BraintrustMiddleware(config?: MiddlewareConfig): LanguageModelV2Middleware<any, any>;
|
|
7193
|
+
|
|
7146
7194
|
/**
|
|
7147
7195
|
* Wrap an ai-sdk model (created with `.chat()`, `.completion()`, etc.) to add tracing. If Braintrust is
|
|
7148
7196
|
* not configured, this is a no-op
|
|
@@ -7327,6 +7375,69 @@ declare class BraintrustSpanProcessor {
|
|
|
7327
7375
|
shutdown(): Promise<void>;
|
|
7328
7376
|
forceFlush(): Promise<void>;
|
|
7329
7377
|
}
|
|
7378
|
+
/**
|
|
7379
|
+
* A trace exporter that sends OpenTelemetry spans to Braintrust.
|
|
7380
|
+
*
|
|
7381
|
+
* This exporter wraps the standard OTLP trace exporter and can be used with
|
|
7382
|
+
* any OpenTelemetry setup, including @vercel/otel's registerOTel function,
|
|
7383
|
+
* NodeSDK, or custom tracer providers. It can optionally filter spans to
|
|
7384
|
+
* only send AI-related telemetry.
|
|
7385
|
+
*
|
|
7386
|
+
* Environment Variables:
|
|
7387
|
+
* - BRAINTRUST_API_KEY: Your Braintrust API key
|
|
7388
|
+
* - BRAINTRUST_PARENT: Parent identifier (e.g., "project_name:test")
|
|
7389
|
+
* - BRAINTRUST_API_URL: Base URL for Braintrust API (defaults to https://api.braintrust.dev)
|
|
7390
|
+
*
|
|
7391
|
+
* @example With @vercel/otel:
|
|
7392
|
+
* ```typescript
|
|
7393
|
+
* import { registerOTel } from '@vercel/otel';
|
|
7394
|
+
* import { BraintrustExporter } from 'braintrust';
|
|
7395
|
+
*
|
|
7396
|
+
* export function register() {
|
|
7397
|
+
* registerOTel({
|
|
7398
|
+
* serviceName: 'my-app',
|
|
7399
|
+
* traceExporter: new BraintrustExporter({
|
|
7400
|
+
* filterAISpans: true,
|
|
7401
|
+
* }),
|
|
7402
|
+
* });
|
|
7403
|
+
* }
|
|
7404
|
+
* ```
|
|
7405
|
+
*
|
|
7406
|
+
* @example With NodeSDK:
|
|
7407
|
+
* ```typescript
|
|
7408
|
+
* import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
7409
|
+
* import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
7410
|
+
* import { BraintrustExporter } from 'braintrust';
|
|
7411
|
+
*
|
|
7412
|
+
* const sdk = new NodeSDK({
|
|
7413
|
+
* spanProcessors: [
|
|
7414
|
+
* new BatchSpanProcessor(new BraintrustExporter({
|
|
7415
|
+
* apiKey: 'your-api-key',
|
|
7416
|
+
* parent: 'project_name:test'
|
|
7417
|
+
* }))
|
|
7418
|
+
* ]
|
|
7419
|
+
* });
|
|
7420
|
+
* ```
|
|
7421
|
+
*/
|
|
7422
|
+
declare class BraintrustExporter {
|
|
7423
|
+
private static checkOtelAvailable;
|
|
7424
|
+
private readonly processor;
|
|
7425
|
+
private readonly spans;
|
|
7426
|
+
private readonly callbacks;
|
|
7427
|
+
constructor(options?: BraintrustSpanProcessorOptions);
|
|
7428
|
+
/**
|
|
7429
|
+
* Export spans to Braintrust by simulating span processor behavior.
|
|
7430
|
+
*/
|
|
7431
|
+
export(spans: ReadableSpan[], resultCallback: (result: any) => void): void;
|
|
7432
|
+
/**
|
|
7433
|
+
* Shutdown the exporter.
|
|
7434
|
+
*/
|
|
7435
|
+
shutdown(): Promise<void>;
|
|
7436
|
+
/**
|
|
7437
|
+
* Force flush the exporter.
|
|
7438
|
+
*/
|
|
7439
|
+
forceFlush(): Promise<void>;
|
|
7440
|
+
}
|
|
7330
7441
|
|
|
7331
7442
|
type braintrust_AISpanProcessor = AISpanProcessor;
|
|
7332
7443
|
declare const braintrust_AISpanProcessor: typeof AISpanProcessor;
|
|
@@ -7339,6 +7450,9 @@ type braintrust_BaseAttachment = BaseAttachment;
|
|
|
7339
7450
|
declare const braintrust_BaseAttachment: typeof BaseAttachment;
|
|
7340
7451
|
declare const braintrust_BaseExperiment: typeof BaseExperiment;
|
|
7341
7452
|
type braintrust_BaseMetadata = BaseMetadata;
|
|
7453
|
+
type braintrust_BraintrustExporter = BraintrustExporter;
|
|
7454
|
+
declare const braintrust_BraintrustExporter: typeof BraintrustExporter;
|
|
7455
|
+
declare const braintrust_BraintrustMiddleware: typeof BraintrustMiddleware;
|
|
7342
7456
|
type braintrust_BraintrustSpanProcessor = BraintrustSpanProcessor;
|
|
7343
7457
|
declare const braintrust_BraintrustSpanProcessor: typeof BraintrustSpanProcessor;
|
|
7344
7458
|
type braintrust_BraintrustState = BraintrustState;
|
|
@@ -7497,7 +7611,7 @@ declare const braintrust_wrapOpenAI: typeof wrapOpenAI;
|
|
|
7497
7611
|
declare const braintrust_wrapOpenAIv4: typeof wrapOpenAIv4;
|
|
7498
7612
|
declare const braintrust_wrapTraced: typeof wrapTraced;
|
|
7499
7613
|
declare namespace braintrust {
|
|
7500
|
-
export { braintrust_AISpanProcessor as AISpanProcessor, type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, braintrust_BaseExperiment as BaseExperiment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustSpanProcessor as BraintrustSpanProcessor, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, braintrust_CodeFunction as CodeFunction, type braintrust_CodeOpts as CodeOpts, braintrust_CodePrompt as CodePrompt, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_CreateProjectOpts as CreateProjectOpts, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetSummary as DatasetSummary, type braintrust_DefaultMetadataType as DefaultMetadataType, type braintrust_DefaultPromptArgs as DefaultPromptArgs, braintrust_ERR_PERMALINK as ERR_PERMALINK, type braintrust_EndSpanArgs as EndSpanArgs, braintrust_Eval as Eval, type braintrust_EvalCase as EvalCase, type braintrust_EvalHooks as EvalHooks, type braintrust_EvalResult as EvalResult, braintrust_EvalResultWithSummary as EvalResultWithSummary, type braintrust_EvalScorer as EvalScorer, type braintrust_EvalScorerArgs as EvalScorerArgs, type braintrust_EvalTask as EvalTask, type braintrust_Evaluator as Evaluator, type braintrust_EvaluatorDef as EvaluatorDef, type braintrust_EvaluatorFile as EvaluatorFile, braintrust_Experiment as Experiment, type braintrust_ExperimentSummary as ExperimentSummary, type braintrust_Exportable as Exportable, braintrust_ExternalAttachment as ExternalAttachment, type braintrust_ExternalAttachmentParams as ExternalAttachmentParams, braintrust_FailedHTTPResponse as FailedHTTPResponse, type braintrust_FullInitOptions as FullInitOptions, type braintrust_FullLoginOptions as FullLoginOptions, type braintrust_FunctionEvent as FunctionEvent, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_InitOptions as InitOptions, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogOptions as LogOptions, braintrust_Logger as Logger, type braintrust_LoginOptions as LoginOptions, type braintrust_MetricSummary as MetricSummary, braintrust_NOOP_SPAN as NOOP_SPAN, braintrust_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, braintrust_NoopSpan as NoopSpan, type braintrust_ObjectMetadata as ObjectMetadata, braintrust_Project as Project, braintrust_ProjectNameIdMap as ProjectNameIdMap, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, braintrust_PromptBuilder as PromptBuilder, type braintrust_PromptContents as PromptContents, type braintrust_PromptDefinition as PromptDefinition, type braintrust_PromptDefinitionWithTools as PromptDefinitionWithTools, type braintrust_PromptOpts as PromptOpts, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, braintrust_Reporter as Reporter, type braintrust_ReporterBody as ReporterBody, type braintrust_ScoreSummary as ScoreSummary, braintrust_ScorerBuilder as ScorerBuilder, type braintrust_ScorerOpts as ScorerOpts, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type Span$1 as Span, type braintrust_SpanContext as SpanContext, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, braintrust_ToolBuilder as ToolBuilder, type braintrust_WithTransactionId as WithTransactionId, braintrust_X_CACHED_HEADER as X_CACHED_HEADER, braintrust__exportsForTestingOnly as _exportsForTestingOnly, braintrust__internalGetGlobalState as _internalGetGlobalState, braintrust__internalSetInitialState as _internalSetInitialState, braintrust_braintrustStreamChunkSchema as braintrustStreamChunkSchema, braintrust_buildLocalSummary as buildLocalSummary, braintrust_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_defaultErrorScoreHandler as defaultErrorScoreHandler, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_flush as flush, braintrust_getSpanParentObject as getSpanParentObject, graphFramework as graph, braintrust_init as init, braintrust_initDataset as initDataset, braintrust_initExperiment as initExperiment, braintrust_initFunction as initFunction, braintrust_initLogger as initLogger, braintrust_invoke as invoke, braintrust_loadPrompt as loadPrompt, braintrust_log as log, braintrust_logError as logError, braintrust_login as login, braintrust_loginToState as loginToState, braintrust_newId as newId, braintrust_parseCachedHeader as parseCachedHeader, braintrust_permalink as permalink, braintrust_projects as projects, braintrust_promptContentsSchema as promptContentsSchema, braintrust_promptDefinitionSchema as promptDefinitionSchema, braintrust_promptDefinitionToPromptData as promptDefinitionToPromptData, braintrust_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, braintrust_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_reportFailures as reportFailures, braintrust_runEvaluator as runEvaluator, braintrust_setFetch as setFetch, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, braintrust_toolFunctionDefinitionSchema as toolFunctionDefinitionSchema, braintrust_traceable as traceable, braintrust_traced as traced, braintrust_updateSpan as updateSpan, braintrust_withCurrent as withCurrent, braintrust_withDataset as withDataset, braintrust_withExperiment as withExperiment, braintrust_withLogger as withLogger, braintrust_withParent as withParent, braintrust_wrapAISDKModel as wrapAISDKModel, braintrust_wrapAnthropic as wrapAnthropic, braintrust_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
|
|
7614
|
+
export { braintrust_AISpanProcessor as AISpanProcessor, type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, braintrust_BaseExperiment as BaseExperiment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustExporter as BraintrustExporter, braintrust_BraintrustMiddleware as BraintrustMiddleware, braintrust_BraintrustSpanProcessor as BraintrustSpanProcessor, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, braintrust_CodeFunction as CodeFunction, type braintrust_CodeOpts as CodeOpts, braintrust_CodePrompt as CodePrompt, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_CreateProjectOpts as CreateProjectOpts, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetSummary as DatasetSummary, type braintrust_DefaultMetadataType as DefaultMetadataType, type braintrust_DefaultPromptArgs as DefaultPromptArgs, braintrust_ERR_PERMALINK as ERR_PERMALINK, type braintrust_EndSpanArgs as EndSpanArgs, braintrust_Eval as Eval, type braintrust_EvalCase as EvalCase, type braintrust_EvalHooks as EvalHooks, type braintrust_EvalResult as EvalResult, braintrust_EvalResultWithSummary as EvalResultWithSummary, type braintrust_EvalScorer as EvalScorer, type braintrust_EvalScorerArgs as EvalScorerArgs, type braintrust_EvalTask as EvalTask, type braintrust_Evaluator as Evaluator, type braintrust_EvaluatorDef as EvaluatorDef, type braintrust_EvaluatorFile as EvaluatorFile, braintrust_Experiment as Experiment, type braintrust_ExperimentSummary as ExperimentSummary, type braintrust_Exportable as Exportable, braintrust_ExternalAttachment as ExternalAttachment, type braintrust_ExternalAttachmentParams as ExternalAttachmentParams, braintrust_FailedHTTPResponse as FailedHTTPResponse, type braintrust_FullInitOptions as FullInitOptions, type braintrust_FullLoginOptions as FullLoginOptions, type braintrust_FunctionEvent as FunctionEvent, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_InitOptions as InitOptions, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogOptions as LogOptions, braintrust_Logger as Logger, type braintrust_LoginOptions as LoginOptions, type braintrust_MetricSummary as MetricSummary, braintrust_NOOP_SPAN as NOOP_SPAN, braintrust_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, braintrust_NoopSpan as NoopSpan, type braintrust_ObjectMetadata as ObjectMetadata, braintrust_Project as Project, braintrust_ProjectNameIdMap as ProjectNameIdMap, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, braintrust_PromptBuilder as PromptBuilder, type braintrust_PromptContents as PromptContents, type braintrust_PromptDefinition as PromptDefinition, type braintrust_PromptDefinitionWithTools as PromptDefinitionWithTools, type braintrust_PromptOpts as PromptOpts, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, braintrust_Reporter as Reporter, type braintrust_ReporterBody as ReporterBody, type braintrust_ScoreSummary as ScoreSummary, braintrust_ScorerBuilder as ScorerBuilder, type braintrust_ScorerOpts as ScorerOpts, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type Span$1 as Span, type braintrust_SpanContext as SpanContext, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, braintrust_ToolBuilder as ToolBuilder, type braintrust_WithTransactionId as WithTransactionId, braintrust_X_CACHED_HEADER as X_CACHED_HEADER, braintrust__exportsForTestingOnly as _exportsForTestingOnly, braintrust__internalGetGlobalState as _internalGetGlobalState, braintrust__internalSetInitialState as _internalSetInitialState, braintrust_braintrustStreamChunkSchema as braintrustStreamChunkSchema, braintrust_buildLocalSummary as buildLocalSummary, braintrust_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_defaultErrorScoreHandler as defaultErrorScoreHandler, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_flush as flush, braintrust_getSpanParentObject as getSpanParentObject, graphFramework as graph, braintrust_init as init, braintrust_initDataset as initDataset, braintrust_initExperiment as initExperiment, braintrust_initFunction as initFunction, braintrust_initLogger as initLogger, braintrust_invoke as invoke, braintrust_loadPrompt as loadPrompt, braintrust_log as log, braintrust_logError as logError, braintrust_login as login, braintrust_loginToState as loginToState, braintrust_newId as newId, braintrust_parseCachedHeader as parseCachedHeader, braintrust_permalink as permalink, braintrust_projects as projects, braintrust_promptContentsSchema as promptContentsSchema, braintrust_promptDefinitionSchema as promptDefinitionSchema, braintrust_promptDefinitionToPromptData as promptDefinitionToPromptData, braintrust_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, braintrust_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_reportFailures as reportFailures, braintrust_runEvaluator as runEvaluator, braintrust_setFetch as setFetch, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, braintrust_toolFunctionDefinitionSchema as toolFunctionDefinitionSchema, braintrust_traceable as traceable, braintrust_traced as traced, braintrust_updateSpan as updateSpan, braintrust_withCurrent as withCurrent, braintrust_withDataset as withDataset, braintrust_withExperiment as withExperiment, braintrust_withLogger as withLogger, braintrust_withParent as withParent, braintrust_wrapAISDKModel as wrapAISDKModel, braintrust_wrapAnthropic as wrapAnthropic, braintrust_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
|
|
7501
7615
|
}
|
|
7502
7616
|
|
|
7503
7617
|
type EvaluatorManifest = Record<string, EvaluatorDef<unknown, unknown, unknown, BaseMetadata>>;
|
|
@@ -7590,23 +7704,23 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
7590
7704
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
|
|
7591
7705
|
}, "strip", z.ZodTypeAny, {
|
|
7592
7706
|
url: string;
|
|
7593
|
-
detail?: "auto" | "
|
|
7707
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
7594
7708
|
}, {
|
|
7595
7709
|
url?: unknown;
|
|
7596
|
-
detail?: "auto" | "
|
|
7710
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
7597
7711
|
}>;
|
|
7598
7712
|
type: z.ZodLiteral<"image_url">;
|
|
7599
7713
|
}, "strip", z.ZodTypeAny, {
|
|
7600
7714
|
type: "image_url";
|
|
7601
7715
|
image_url: {
|
|
7602
7716
|
url: string;
|
|
7603
|
-
detail?: "auto" | "
|
|
7717
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
7604
7718
|
};
|
|
7605
7719
|
}, {
|
|
7606
7720
|
type: "image_url";
|
|
7607
7721
|
image_url: {
|
|
7608
7722
|
url?: unknown;
|
|
7609
|
-
detail?: "auto" | "
|
|
7723
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
7610
7724
|
};
|
|
7611
7725
|
}>]>, "many">]>;
|
|
7612
7726
|
role: z.ZodLiteral<"user">;
|
|
@@ -7622,7 +7736,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
7622
7736
|
type: "image_url";
|
|
7623
7737
|
image_url: {
|
|
7624
7738
|
url: string;
|
|
7625
|
-
detail?: "auto" | "
|
|
7739
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
7626
7740
|
};
|
|
7627
7741
|
})[];
|
|
7628
7742
|
role: "user";
|
|
@@ -7640,7 +7754,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
7640
7754
|
type: "image_url";
|
|
7641
7755
|
image_url: {
|
|
7642
7756
|
url?: unknown;
|
|
7643
|
-
detail?: "auto" | "
|
|
7757
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
7644
7758
|
};
|
|
7645
7759
|
})[] | undefined;
|
|
7646
7760
|
}>, z.ZodObject<{
|
|
@@ -7943,7 +8057,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
7943
8057
|
type: "image_url";
|
|
7944
8058
|
image_url: {
|
|
7945
8059
|
url: string;
|
|
7946
|
-
detail?: "auto" | "
|
|
8060
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
7947
8061
|
};
|
|
7948
8062
|
})[];
|
|
7949
8063
|
role: "user";
|
|
@@ -8028,7 +8142,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
8028
8142
|
type: "image_url";
|
|
8029
8143
|
image_url: {
|
|
8030
8144
|
url?: unknown;
|
|
8031
|
-
detail?: "auto" | "
|
|
8145
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
8032
8146
|
};
|
|
8033
8147
|
})[] | undefined;
|
|
8034
8148
|
} | {
|
|
@@ -8831,7 +8945,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
8831
8945
|
type: "image_url";
|
|
8832
8946
|
image_url: {
|
|
8833
8947
|
url: string;
|
|
8834
|
-
detail?: "auto" | "
|
|
8948
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
8835
8949
|
};
|
|
8836
8950
|
})[];
|
|
8837
8951
|
role: "user";
|
|
@@ -9052,7 +9166,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
9052
9166
|
type: "image_url";
|
|
9053
9167
|
image_url: {
|
|
9054
9168
|
url?: unknown;
|
|
9055
|
-
detail?: "auto" | "
|
|
9169
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9056
9170
|
};
|
|
9057
9171
|
})[] | undefined;
|
|
9058
9172
|
} | {
|
|
@@ -9273,7 +9387,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
9273
9387
|
type: "image_url";
|
|
9274
9388
|
image_url: {
|
|
9275
9389
|
url: string;
|
|
9276
|
-
detail?: "auto" | "
|
|
9390
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9277
9391
|
};
|
|
9278
9392
|
})[];
|
|
9279
9393
|
role: "user";
|
|
@@ -9498,7 +9612,7 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
|
|
|
9498
9612
|
type: "image_url";
|
|
9499
9613
|
image_url: {
|
|
9500
9614
|
url?: unknown;
|
|
9501
|
-
detail?: "auto" | "
|
|
9615
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9502
9616
|
};
|
|
9503
9617
|
})[] | undefined;
|
|
9504
9618
|
} | {
|
|
@@ -9673,23 +9787,23 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
9673
9787
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
|
|
9674
9788
|
}, "strip", z.ZodTypeAny, {
|
|
9675
9789
|
url: string;
|
|
9676
|
-
detail?: "auto" | "
|
|
9790
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9677
9791
|
}, {
|
|
9678
9792
|
url?: unknown;
|
|
9679
|
-
detail?: "auto" | "
|
|
9793
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9680
9794
|
}>;
|
|
9681
9795
|
type: z.ZodLiteral<"image_url">;
|
|
9682
9796
|
}, "strip", z.ZodTypeAny, {
|
|
9683
9797
|
type: "image_url";
|
|
9684
9798
|
image_url: {
|
|
9685
9799
|
url: string;
|
|
9686
|
-
detail?: "auto" | "
|
|
9800
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9687
9801
|
};
|
|
9688
9802
|
}, {
|
|
9689
9803
|
type: "image_url";
|
|
9690
9804
|
image_url: {
|
|
9691
9805
|
url?: unknown;
|
|
9692
|
-
detail?: "auto" | "
|
|
9806
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9693
9807
|
};
|
|
9694
9808
|
}>]>, "many">]>;
|
|
9695
9809
|
role: z.ZodLiteral<"user">;
|
|
@@ -9705,7 +9819,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
9705
9819
|
type: "image_url";
|
|
9706
9820
|
image_url: {
|
|
9707
9821
|
url: string;
|
|
9708
|
-
detail?: "auto" | "
|
|
9822
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9709
9823
|
};
|
|
9710
9824
|
})[];
|
|
9711
9825
|
role: "user";
|
|
@@ -9723,7 +9837,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
9723
9837
|
type: "image_url";
|
|
9724
9838
|
image_url: {
|
|
9725
9839
|
url?: unknown;
|
|
9726
|
-
detail?: "auto" | "
|
|
9840
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
9727
9841
|
};
|
|
9728
9842
|
})[] | undefined;
|
|
9729
9843
|
}>, z.ZodObject<{
|
|
@@ -10026,7 +10140,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
10026
10140
|
type: "image_url";
|
|
10027
10141
|
image_url: {
|
|
10028
10142
|
url: string;
|
|
10029
|
-
detail?: "auto" | "
|
|
10143
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
10030
10144
|
};
|
|
10031
10145
|
})[];
|
|
10032
10146
|
role: "user";
|
|
@@ -10111,7 +10225,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
10111
10225
|
type: "image_url";
|
|
10112
10226
|
image_url: {
|
|
10113
10227
|
url?: unknown;
|
|
10114
|
-
detail?: "auto" | "
|
|
10228
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
10115
10229
|
};
|
|
10116
10230
|
})[] | undefined;
|
|
10117
10231
|
} | {
|
|
@@ -10914,7 +11028,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
10914
11028
|
type: "image_url";
|
|
10915
11029
|
image_url: {
|
|
10916
11030
|
url: string;
|
|
10917
|
-
detail?: "auto" | "
|
|
11031
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
10918
11032
|
};
|
|
10919
11033
|
})[];
|
|
10920
11034
|
role: "user";
|
|
@@ -11135,7 +11249,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
11135
11249
|
type: "image_url";
|
|
11136
11250
|
image_url: {
|
|
11137
11251
|
url?: unknown;
|
|
11138
|
-
detail?: "auto" | "
|
|
11252
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
11139
11253
|
};
|
|
11140
11254
|
})[] | undefined;
|
|
11141
11255
|
} | {
|
|
@@ -11356,7 +11470,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
11356
11470
|
type: "image_url";
|
|
11357
11471
|
image_url: {
|
|
11358
11472
|
url: string;
|
|
11359
|
-
detail?: "auto" | "
|
|
11473
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
11360
11474
|
};
|
|
11361
11475
|
})[];
|
|
11362
11476
|
role: "user";
|
|
@@ -11581,7 +11695,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
11581
11695
|
type: "image_url";
|
|
11582
11696
|
image_url: {
|
|
11583
11697
|
url?: unknown;
|
|
11584
|
-
detail?: "auto" | "
|
|
11698
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
11585
11699
|
};
|
|
11586
11700
|
})[] | undefined;
|
|
11587
11701
|
} | {
|
|
@@ -11819,7 +11933,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
11819
11933
|
type: "image_url";
|
|
11820
11934
|
image_url: {
|
|
11821
11935
|
url: string;
|
|
11822
|
-
detail?: "auto" | "
|
|
11936
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
11823
11937
|
};
|
|
11824
11938
|
})[];
|
|
11825
11939
|
role: "user";
|
|
@@ -12051,7 +12165,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
12051
12165
|
type: "image_url";
|
|
12052
12166
|
image_url: {
|
|
12053
12167
|
url?: unknown;
|
|
12054
|
-
detail?: "auto" | "
|
|
12168
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12055
12169
|
};
|
|
12056
12170
|
})[] | undefined;
|
|
12057
12171
|
} | {
|
|
@@ -12217,23 +12331,23 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
12217
12331
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
|
|
12218
12332
|
}, "strip", z.ZodTypeAny, {
|
|
12219
12333
|
url: string;
|
|
12220
|
-
detail?: "auto" | "
|
|
12334
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12221
12335
|
}, {
|
|
12222
12336
|
url?: unknown;
|
|
12223
|
-
detail?: "auto" | "
|
|
12337
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12224
12338
|
}>;
|
|
12225
12339
|
type: z.ZodLiteral<"image_url">;
|
|
12226
12340
|
}, "strip", z.ZodTypeAny, {
|
|
12227
12341
|
type: "image_url";
|
|
12228
12342
|
image_url: {
|
|
12229
12343
|
url: string;
|
|
12230
|
-
detail?: "auto" | "
|
|
12344
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12231
12345
|
};
|
|
12232
12346
|
}, {
|
|
12233
12347
|
type: "image_url";
|
|
12234
12348
|
image_url: {
|
|
12235
12349
|
url?: unknown;
|
|
12236
|
-
detail?: "auto" | "
|
|
12350
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12237
12351
|
};
|
|
12238
12352
|
}>]>, "many">]>;
|
|
12239
12353
|
role: z.ZodLiteral<"user">;
|
|
@@ -12249,7 +12363,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
12249
12363
|
type: "image_url";
|
|
12250
12364
|
image_url: {
|
|
12251
12365
|
url: string;
|
|
12252
|
-
detail?: "auto" | "
|
|
12366
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12253
12367
|
};
|
|
12254
12368
|
})[];
|
|
12255
12369
|
role: "user";
|
|
@@ -12267,7 +12381,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
12267
12381
|
type: "image_url";
|
|
12268
12382
|
image_url: {
|
|
12269
12383
|
url?: unknown;
|
|
12270
|
-
detail?: "auto" | "
|
|
12384
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12271
12385
|
};
|
|
12272
12386
|
})[] | undefined;
|
|
12273
12387
|
}>, z.ZodObject<{
|
|
@@ -12570,7 +12684,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
12570
12684
|
type: "image_url";
|
|
12571
12685
|
image_url: {
|
|
12572
12686
|
url: string;
|
|
12573
|
-
detail?: "auto" | "
|
|
12687
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12574
12688
|
};
|
|
12575
12689
|
})[];
|
|
12576
12690
|
role: "user";
|
|
@@ -12655,7 +12769,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
12655
12769
|
type: "image_url";
|
|
12656
12770
|
image_url: {
|
|
12657
12771
|
url?: unknown;
|
|
12658
|
-
detail?: "auto" | "
|
|
12772
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
12659
12773
|
};
|
|
12660
12774
|
})[] | undefined;
|
|
12661
12775
|
} | {
|
|
@@ -13458,7 +13572,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
13458
13572
|
type: "image_url";
|
|
13459
13573
|
image_url: {
|
|
13460
13574
|
url: string;
|
|
13461
|
-
detail?: "auto" | "
|
|
13575
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
13462
13576
|
};
|
|
13463
13577
|
})[];
|
|
13464
13578
|
role: "user";
|
|
@@ -13679,7 +13793,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
13679
13793
|
type: "image_url";
|
|
13680
13794
|
image_url: {
|
|
13681
13795
|
url?: unknown;
|
|
13682
|
-
detail?: "auto" | "
|
|
13796
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
13683
13797
|
};
|
|
13684
13798
|
})[] | undefined;
|
|
13685
13799
|
} | {
|
|
@@ -13900,7 +14014,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
13900
14014
|
type: "image_url";
|
|
13901
14015
|
image_url: {
|
|
13902
14016
|
url: string;
|
|
13903
|
-
detail?: "auto" | "
|
|
14017
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
13904
14018
|
};
|
|
13905
14019
|
})[];
|
|
13906
14020
|
role: "user";
|
|
@@ -14125,7 +14239,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
14125
14239
|
type: "image_url";
|
|
14126
14240
|
image_url: {
|
|
14127
14241
|
url?: unknown;
|
|
14128
|
-
detail?: "auto" | "
|
|
14242
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
14129
14243
|
};
|
|
14130
14244
|
})[] | undefined;
|
|
14131
14245
|
} | {
|
|
@@ -14363,7 +14477,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
14363
14477
|
type: "image_url";
|
|
14364
14478
|
image_url: {
|
|
14365
14479
|
url: string;
|
|
14366
|
-
detail?: "auto" | "
|
|
14480
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
14367
14481
|
};
|
|
14368
14482
|
})[];
|
|
14369
14483
|
role: "user";
|
|
@@ -14595,7 +14709,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
14595
14709
|
type: "image_url";
|
|
14596
14710
|
image_url: {
|
|
14597
14711
|
url?: unknown;
|
|
14598
|
-
detail?: "auto" | "
|
|
14712
|
+
detail?: "auto" | "low" | "high" | undefined;
|
|
14599
14713
|
};
|
|
14600
14714
|
})[] | undefined;
|
|
14601
14715
|
} | {
|
|
@@ -14725,4 +14839,4 @@ type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
|
|
|
14725
14839
|
* @module braintrust
|
|
14726
14840
|
*/
|
|
14727
14841
|
|
|
14728
|
-
export { AISpanProcessor, type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustSpanProcessor, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type CreateProjectOpts, type DataSummary, Dataset, 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 ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, type FunctionEvent, INTERNAL_BTQL_LIMIT, type InitOptions, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, Reporter, type ReporterBody, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span$1 as Span, type SpanContext, SpanImpl, type StartSpanArgs, TestBackgroundLogger, ToolBuilder, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, buildLocalSummary, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, braintrust as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getSpanParentObject, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, renderMessage, renderPromptParams, reportFailures, runEvaluator, setFetch, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDKModel, wrapAnthropic, wrapOpenAI, wrapOpenAIv4, wrapTraced };
|
|
14842
|
+
export { AISpanProcessor, type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustExporter, BraintrustMiddleware, BraintrustSpanProcessor, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type CreateProjectOpts, type DataSummary, Dataset, 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 ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, type FunctionEvent, INTERNAL_BTQL_LIMIT, type InitOptions, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, Reporter, type ReporterBody, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span$1 as Span, type SpanContext, SpanImpl, type StartSpanArgs, TestBackgroundLogger, ToolBuilder, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, buildLocalSummary, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, braintrust as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getSpanParentObject, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, renderMessage, renderPromptParams, reportFailures, runEvaluator, setFetch, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDKModel, wrapAnthropic, wrapOpenAI, wrapOpenAIv4, wrapTraced };
|