braintrust 0.2.5 → 0.3.6
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 +20 -20
- package/dev/dist/index.d.ts +20 -20
- package/dev/dist/index.js +50 -12
- package/dev/dist/index.mjs +50 -12
- package/dist/browser.d.mts +20 -20
- package/dist/browser.d.ts +20 -20
- package/dist/browser.js +167 -96
- package/dist/browser.mjs +159 -88
- package/dist/cli.js +57 -19
- package/dist/index.d.mts +21 -20
- package/dist/index.d.ts +21 -20
- package/dist/index.js +189 -118
- package/dist/index.mjs +160 -89
- package/package.json +7 -7
package/dev/dist/index.d.mts
CHANGED
|
@@ -935,26 +935,6 @@ declare const ChatCompletionTool: z.ZodObject<{
|
|
|
935
935
|
type: "function";
|
|
936
936
|
}>;
|
|
937
937
|
type ChatCompletionToolType = z.infer<typeof ChatCompletionTool>;
|
|
938
|
-
declare const ObjectReference: z.ZodUnion<[z.ZodObject<{
|
|
939
|
-
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
940
|
-
object_id: z.ZodString;
|
|
941
|
-
id: z.ZodString;
|
|
942
|
-
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
943
|
-
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
944
|
-
}, "strip", z.ZodTypeAny, {
|
|
945
|
-
id: string;
|
|
946
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
947
|
-
object_id: string;
|
|
948
|
-
created?: string | null | undefined;
|
|
949
|
-
_xact_id?: string | null | undefined;
|
|
950
|
-
}, {
|
|
951
|
-
id: string;
|
|
952
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
953
|
-
object_id: string;
|
|
954
|
-
created?: string | null | undefined;
|
|
955
|
-
_xact_id?: string | null | undefined;
|
|
956
|
-
}>, z.ZodNull]>;
|
|
957
|
-
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
958
938
|
declare const RepoInfo: z.ZodUnion<[z.ZodObject<{
|
|
959
939
|
commit: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
960
940
|
branch: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -4700,6 +4680,26 @@ declare const GitMetadataSettings: z.ZodObject<{
|
|
|
4700
4680
|
type GitMetadataSettingsType = z.infer<typeof GitMetadataSettings>;
|
|
4701
4681
|
declare const IfExists: z.ZodEnum<["error", "ignore", "replace"]>;
|
|
4702
4682
|
type IfExistsType = z.infer<typeof IfExists>;
|
|
4683
|
+
declare const ObjectReference: z.ZodObject<{
|
|
4684
|
+
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
4685
|
+
object_id: z.ZodString;
|
|
4686
|
+
id: z.ZodString;
|
|
4687
|
+
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
4688
|
+
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
4689
|
+
}, "strip", z.ZodTypeAny, {
|
|
4690
|
+
id: string;
|
|
4691
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
4692
|
+
object_id: string;
|
|
4693
|
+
created?: string | null | undefined;
|
|
4694
|
+
_xact_id?: string | null | undefined;
|
|
4695
|
+
}, {
|
|
4696
|
+
id: string;
|
|
4697
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
4698
|
+
object_id: string;
|
|
4699
|
+
created?: string | null | undefined;
|
|
4700
|
+
_xact_id?: string | null | undefined;
|
|
4701
|
+
}>;
|
|
4702
|
+
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
4703
4703
|
declare const Prompt$1: z.ZodObject<{
|
|
4704
4704
|
id: z.ZodString;
|
|
4705
4705
|
_xact_id: z.ZodString;
|
package/dev/dist/index.d.ts
CHANGED
|
@@ -935,26 +935,6 @@ declare const ChatCompletionTool: z.ZodObject<{
|
|
|
935
935
|
type: "function";
|
|
936
936
|
}>;
|
|
937
937
|
type ChatCompletionToolType = z.infer<typeof ChatCompletionTool>;
|
|
938
|
-
declare const ObjectReference: z.ZodUnion<[z.ZodObject<{
|
|
939
|
-
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
940
|
-
object_id: z.ZodString;
|
|
941
|
-
id: z.ZodString;
|
|
942
|
-
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
943
|
-
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
944
|
-
}, "strip", z.ZodTypeAny, {
|
|
945
|
-
id: string;
|
|
946
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
947
|
-
object_id: string;
|
|
948
|
-
created?: string | null | undefined;
|
|
949
|
-
_xact_id?: string | null | undefined;
|
|
950
|
-
}, {
|
|
951
|
-
id: string;
|
|
952
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
953
|
-
object_id: string;
|
|
954
|
-
created?: string | null | undefined;
|
|
955
|
-
_xact_id?: string | null | undefined;
|
|
956
|
-
}>, z.ZodNull]>;
|
|
957
|
-
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
958
938
|
declare const RepoInfo: z.ZodUnion<[z.ZodObject<{
|
|
959
939
|
commit: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
960
940
|
branch: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -4700,6 +4680,26 @@ declare const GitMetadataSettings: z.ZodObject<{
|
|
|
4700
4680
|
type GitMetadataSettingsType = z.infer<typeof GitMetadataSettings>;
|
|
4701
4681
|
declare const IfExists: z.ZodEnum<["error", "ignore", "replace"]>;
|
|
4702
4682
|
type IfExistsType = z.infer<typeof IfExists>;
|
|
4683
|
+
declare const ObjectReference: z.ZodObject<{
|
|
4684
|
+
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
4685
|
+
object_id: z.ZodString;
|
|
4686
|
+
id: z.ZodString;
|
|
4687
|
+
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
4688
|
+
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
4689
|
+
}, "strip", z.ZodTypeAny, {
|
|
4690
|
+
id: string;
|
|
4691
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
4692
|
+
object_id: string;
|
|
4693
|
+
created?: string | null | undefined;
|
|
4694
|
+
_xact_id?: string | null | undefined;
|
|
4695
|
+
}, {
|
|
4696
|
+
id: string;
|
|
4697
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
4698
|
+
object_id: string;
|
|
4699
|
+
created?: string | null | undefined;
|
|
4700
|
+
_xact_id?: string | null | undefined;
|
|
4701
|
+
}>;
|
|
4702
|
+
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
4703
4703
|
declare const Prompt$1: z.ZodObject<{
|
|
4704
4704
|
id: z.ZodString;
|
|
4705
4705
|
_xact_id: z.ZodString;
|
package/dev/dist/index.js
CHANGED
|
@@ -382,7 +382,7 @@ var ResponseFormatJsonSchema = _zod.z.object({
|
|
|
382
382
|
schema: _zod.z.union([_zod.z.object({}).partial().passthrough(), _zod.z.string()]).optional(),
|
|
383
383
|
strict: _zod.z.union([_zod.z.boolean(), _zod.z.null()]).optional()
|
|
384
384
|
});
|
|
385
|
-
var
|
|
385
|
+
var ResponseFormatNullish = _zod.z.union([
|
|
386
386
|
_zod.z.object({ type: _zod.z.literal("json_object") }),
|
|
387
387
|
_zod.z.object({
|
|
388
388
|
type: _zod.z.literal("json_schema"),
|
|
@@ -398,7 +398,7 @@ var AnyModelParams = _zod.z.object({
|
|
|
398
398
|
max_completion_tokens: _zod.z.number().optional(),
|
|
399
399
|
frequency_penalty: _zod.z.number().optional(),
|
|
400
400
|
presence_penalty: _zod.z.number().optional(),
|
|
401
|
-
response_format:
|
|
401
|
+
response_format: ResponseFormatNullish.optional(),
|
|
402
402
|
tool_choice: _zod.z.union([
|
|
403
403
|
_zod.z.literal("auto"),
|
|
404
404
|
_zod.z.literal("none"),
|
|
@@ -436,6 +436,23 @@ var ApiKey = _zod.z.object({
|
|
|
436
436
|
user_family_name: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
437
437
|
org_id: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional()
|
|
438
438
|
});
|
|
439
|
+
var AsyncScoringState = _zod.z.union([
|
|
440
|
+
_zod.z.object({
|
|
441
|
+
status: _zod.z.literal("enabled"),
|
|
442
|
+
token: _zod.z.string(),
|
|
443
|
+
function_ids: _zod.z.array(_zod.z.unknown()).min(1),
|
|
444
|
+
skip_logging: _zod.z.union([_zod.z.boolean(), _zod.z.null()]).optional()
|
|
445
|
+
}),
|
|
446
|
+
_zod.z.object({ status: _zod.z.literal("disabled") }),
|
|
447
|
+
_zod.z.null(),
|
|
448
|
+
_zod.z.null()
|
|
449
|
+
]);
|
|
450
|
+
var AsyncScoringControl = _zod.z.union([
|
|
451
|
+
_zod.z.object({ kind: _zod.z.literal("score_update"), token: _zod.z.string() }),
|
|
452
|
+
_zod.z.object({ kind: _zod.z.literal("state_override"), state: AsyncScoringState }),
|
|
453
|
+
_zod.z.object({ kind: _zod.z.literal("state_force_reselect") }),
|
|
454
|
+
_zod.z.object({ kind: _zod.z.literal("state_enabled_force_rescore") })
|
|
455
|
+
]);
|
|
439
456
|
var BraintrustAttachmentReference = _zod.z.object({
|
|
440
457
|
type: _zod.z.literal("braintrust_attachment"),
|
|
441
458
|
filename: _zod.z.string().min(1),
|
|
@@ -638,7 +655,7 @@ var Dataset = _zod.z.object({
|
|
|
638
655
|
user_id: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
639
656
|
metadata: _zod.z.union([_zod.z.object({}).partial().passthrough(), _zod.z.null()]).optional()
|
|
640
657
|
});
|
|
641
|
-
var
|
|
658
|
+
var ObjectReferenceNullish = _zod.z.union([
|
|
642
659
|
_zod.z.object({
|
|
643
660
|
object_type: _zod.z.enum([
|
|
644
661
|
"project_logs",
|
|
@@ -672,7 +689,7 @@ var DatasetEvent = _zod.z.object({
|
|
|
672
689
|
span_id: _zod.z.string(),
|
|
673
690
|
root_span_id: _zod.z.string(),
|
|
674
691
|
is_root: _zod.z.union([_zod.z.boolean(), _zod.z.null()]).optional(),
|
|
675
|
-
origin:
|
|
692
|
+
origin: ObjectReferenceNullish.optional()
|
|
676
693
|
});
|
|
677
694
|
var EnvVar = _zod.z.object({
|
|
678
695
|
id: _zod.z.string().uuid(),
|
|
@@ -752,7 +769,7 @@ var ExperimentEvent = _zod.z.object({
|
|
|
752
769
|
root_span_id: _zod.z.string(),
|
|
753
770
|
span_attributes: SpanAttributes.optional(),
|
|
754
771
|
is_root: _zod.z.union([_zod.z.boolean(), _zod.z.null()]).optional(),
|
|
755
|
-
origin:
|
|
772
|
+
origin: ObjectReferenceNullish.optional()
|
|
756
773
|
});
|
|
757
774
|
var ExtendedSavedFunctionId = _zod.z.union([
|
|
758
775
|
_zod.z.object({ type: _zod.z.literal("function"), id: _zod.z.string() }),
|
|
@@ -781,7 +798,7 @@ var ModelParams = _zod.z.union([
|
|
|
781
798
|
max_completion_tokens: _zod.z.number(),
|
|
782
799
|
frequency_penalty: _zod.z.number(),
|
|
783
800
|
presence_penalty: _zod.z.number(),
|
|
784
|
-
response_format:
|
|
801
|
+
response_format: ResponseFormatNullish,
|
|
785
802
|
tool_choice: _zod.z.union([
|
|
786
803
|
_zod.z.literal("auto"),
|
|
787
804
|
_zod.z.literal("none"),
|
|
@@ -1104,6 +1121,20 @@ var MessageRole = _zod.z.enum([
|
|
|
1104
1121
|
"model",
|
|
1105
1122
|
"developer"
|
|
1106
1123
|
]);
|
|
1124
|
+
var ObjectReference = _zod.z.object({
|
|
1125
|
+
object_type: _zod.z.enum([
|
|
1126
|
+
"project_logs",
|
|
1127
|
+
"experiment",
|
|
1128
|
+
"dataset",
|
|
1129
|
+
"prompt",
|
|
1130
|
+
"function",
|
|
1131
|
+
"prompt_session"
|
|
1132
|
+
]),
|
|
1133
|
+
object_id: _zod.z.string().uuid(),
|
|
1134
|
+
id: _zod.z.string(),
|
|
1135
|
+
_xact_id: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
1136
|
+
created: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional()
|
|
1137
|
+
});
|
|
1107
1138
|
var OnlineScoreConfig = _zod.z.union([
|
|
1108
1139
|
_zod.z.object({
|
|
1109
1140
|
sampling_rate: _zod.z.number().gte(0).lte(1),
|
|
@@ -1236,7 +1267,7 @@ var ProjectLogsEvent = _zod.z.object({
|
|
|
1236
1267
|
root_span_id: _zod.z.string(),
|
|
1237
1268
|
is_root: _zod.z.union([_zod.z.boolean(), _zod.z.null()]).optional(),
|
|
1238
1269
|
span_attributes: SpanAttributes.optional(),
|
|
1239
|
-
origin:
|
|
1270
|
+
origin: ObjectReferenceNullish.optional()
|
|
1240
1271
|
});
|
|
1241
1272
|
var ProjectScoreType = _zod.z.enum([
|
|
1242
1273
|
"slider",
|
|
@@ -1318,6 +1349,14 @@ var PromptSessionEvent = _zod.z.object({
|
|
|
1318
1349
|
completion: _zod.z.unknown().optional(),
|
|
1319
1350
|
tags: _zod.z.union([_zod.z.array(_zod.z.string()), _zod.z.null()]).optional()
|
|
1320
1351
|
});
|
|
1352
|
+
var ResponseFormat = _zod.z.union([
|
|
1353
|
+
_zod.z.object({ type: _zod.z.literal("json_object") }),
|
|
1354
|
+
_zod.z.object({
|
|
1355
|
+
type: _zod.z.literal("json_schema"),
|
|
1356
|
+
json_schema: ResponseFormatJsonSchema
|
|
1357
|
+
}),
|
|
1358
|
+
_zod.z.object({ type: _zod.z.literal("text") })
|
|
1359
|
+
]);
|
|
1321
1360
|
var Role = _zod.z.object({
|
|
1322
1361
|
id: _zod.z.string().uuid(),
|
|
1323
1362
|
org_id: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
@@ -1377,10 +1416,9 @@ var ServiceToken = _zod.z.object({
|
|
|
1377
1416
|
created: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
1378
1417
|
name: _zod.z.string(),
|
|
1379
1418
|
preview_name: _zod.z.string(),
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
user_family_name: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
1419
|
+
service_account_id: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
1420
|
+
service_account_email: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
1421
|
+
service_account_name: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional(),
|
|
1384
1422
|
org_id: _zod.z.union([_zod.z.string(), _zod.z.null()]).optional()
|
|
1385
1423
|
});
|
|
1386
1424
|
var SpanIFrame = _zod.z.object({
|
|
@@ -1401,7 +1439,7 @@ var SSEConsoleEventData = _zod.z.object({
|
|
|
1401
1439
|
var SSEProgressEventData = _zod.z.object({
|
|
1402
1440
|
id: _zod.z.string(),
|
|
1403
1441
|
object_type: FunctionObjectType,
|
|
1404
|
-
origin:
|
|
1442
|
+
origin: ObjectReferenceNullish.and(_zod.z.unknown()).optional(),
|
|
1405
1443
|
format: FunctionFormat,
|
|
1406
1444
|
output_type: FunctionOutputType,
|
|
1407
1445
|
name: _zod.z.string(),
|
package/dev/dist/index.mjs
CHANGED
|
@@ -382,7 +382,7 @@ var ResponseFormatJsonSchema = z.object({
|
|
|
382
382
|
schema: z.union([z.object({}).partial().passthrough(), z.string()]).optional(),
|
|
383
383
|
strict: z.union([z.boolean(), z.null()]).optional()
|
|
384
384
|
});
|
|
385
|
-
var
|
|
385
|
+
var ResponseFormatNullish = z.union([
|
|
386
386
|
z.object({ type: z.literal("json_object") }),
|
|
387
387
|
z.object({
|
|
388
388
|
type: z.literal("json_schema"),
|
|
@@ -398,7 +398,7 @@ var AnyModelParams = z.object({
|
|
|
398
398
|
max_completion_tokens: z.number().optional(),
|
|
399
399
|
frequency_penalty: z.number().optional(),
|
|
400
400
|
presence_penalty: z.number().optional(),
|
|
401
|
-
response_format:
|
|
401
|
+
response_format: ResponseFormatNullish.optional(),
|
|
402
402
|
tool_choice: z.union([
|
|
403
403
|
z.literal("auto"),
|
|
404
404
|
z.literal("none"),
|
|
@@ -436,6 +436,23 @@ var ApiKey = z.object({
|
|
|
436
436
|
user_family_name: z.union([z.string(), z.null()]).optional(),
|
|
437
437
|
org_id: z.union([z.string(), z.null()]).optional()
|
|
438
438
|
});
|
|
439
|
+
var AsyncScoringState = z.union([
|
|
440
|
+
z.object({
|
|
441
|
+
status: z.literal("enabled"),
|
|
442
|
+
token: z.string(),
|
|
443
|
+
function_ids: z.array(z.unknown()).min(1),
|
|
444
|
+
skip_logging: z.union([z.boolean(), z.null()]).optional()
|
|
445
|
+
}),
|
|
446
|
+
z.object({ status: z.literal("disabled") }),
|
|
447
|
+
z.null(),
|
|
448
|
+
z.null()
|
|
449
|
+
]);
|
|
450
|
+
var AsyncScoringControl = z.union([
|
|
451
|
+
z.object({ kind: z.literal("score_update"), token: z.string() }),
|
|
452
|
+
z.object({ kind: z.literal("state_override"), state: AsyncScoringState }),
|
|
453
|
+
z.object({ kind: z.literal("state_force_reselect") }),
|
|
454
|
+
z.object({ kind: z.literal("state_enabled_force_rescore") })
|
|
455
|
+
]);
|
|
439
456
|
var BraintrustAttachmentReference = z.object({
|
|
440
457
|
type: z.literal("braintrust_attachment"),
|
|
441
458
|
filename: z.string().min(1),
|
|
@@ -638,7 +655,7 @@ var Dataset = z.object({
|
|
|
638
655
|
user_id: z.union([z.string(), z.null()]).optional(),
|
|
639
656
|
metadata: z.union([z.object({}).partial().passthrough(), z.null()]).optional()
|
|
640
657
|
});
|
|
641
|
-
var
|
|
658
|
+
var ObjectReferenceNullish = z.union([
|
|
642
659
|
z.object({
|
|
643
660
|
object_type: z.enum([
|
|
644
661
|
"project_logs",
|
|
@@ -672,7 +689,7 @@ var DatasetEvent = z.object({
|
|
|
672
689
|
span_id: z.string(),
|
|
673
690
|
root_span_id: z.string(),
|
|
674
691
|
is_root: z.union([z.boolean(), z.null()]).optional(),
|
|
675
|
-
origin:
|
|
692
|
+
origin: ObjectReferenceNullish.optional()
|
|
676
693
|
});
|
|
677
694
|
var EnvVar = z.object({
|
|
678
695
|
id: z.string().uuid(),
|
|
@@ -752,7 +769,7 @@ var ExperimentEvent = z.object({
|
|
|
752
769
|
root_span_id: z.string(),
|
|
753
770
|
span_attributes: SpanAttributes.optional(),
|
|
754
771
|
is_root: z.union([z.boolean(), z.null()]).optional(),
|
|
755
|
-
origin:
|
|
772
|
+
origin: ObjectReferenceNullish.optional()
|
|
756
773
|
});
|
|
757
774
|
var ExtendedSavedFunctionId = z.union([
|
|
758
775
|
z.object({ type: z.literal("function"), id: z.string() }),
|
|
@@ -781,7 +798,7 @@ var ModelParams = z.union([
|
|
|
781
798
|
max_completion_tokens: z.number(),
|
|
782
799
|
frequency_penalty: z.number(),
|
|
783
800
|
presence_penalty: z.number(),
|
|
784
|
-
response_format:
|
|
801
|
+
response_format: ResponseFormatNullish,
|
|
785
802
|
tool_choice: z.union([
|
|
786
803
|
z.literal("auto"),
|
|
787
804
|
z.literal("none"),
|
|
@@ -1104,6 +1121,20 @@ var MessageRole = z.enum([
|
|
|
1104
1121
|
"model",
|
|
1105
1122
|
"developer"
|
|
1106
1123
|
]);
|
|
1124
|
+
var ObjectReference = z.object({
|
|
1125
|
+
object_type: z.enum([
|
|
1126
|
+
"project_logs",
|
|
1127
|
+
"experiment",
|
|
1128
|
+
"dataset",
|
|
1129
|
+
"prompt",
|
|
1130
|
+
"function",
|
|
1131
|
+
"prompt_session"
|
|
1132
|
+
]),
|
|
1133
|
+
object_id: z.string().uuid(),
|
|
1134
|
+
id: z.string(),
|
|
1135
|
+
_xact_id: z.union([z.string(), z.null()]).optional(),
|
|
1136
|
+
created: z.union([z.string(), z.null()]).optional()
|
|
1137
|
+
});
|
|
1107
1138
|
var OnlineScoreConfig = z.union([
|
|
1108
1139
|
z.object({
|
|
1109
1140
|
sampling_rate: z.number().gte(0).lte(1),
|
|
@@ -1236,7 +1267,7 @@ var ProjectLogsEvent = z.object({
|
|
|
1236
1267
|
root_span_id: z.string(),
|
|
1237
1268
|
is_root: z.union([z.boolean(), z.null()]).optional(),
|
|
1238
1269
|
span_attributes: SpanAttributes.optional(),
|
|
1239
|
-
origin:
|
|
1270
|
+
origin: ObjectReferenceNullish.optional()
|
|
1240
1271
|
});
|
|
1241
1272
|
var ProjectScoreType = z.enum([
|
|
1242
1273
|
"slider",
|
|
@@ -1318,6 +1349,14 @@ var PromptSessionEvent = z.object({
|
|
|
1318
1349
|
completion: z.unknown().optional(),
|
|
1319
1350
|
tags: z.union([z.array(z.string()), z.null()]).optional()
|
|
1320
1351
|
});
|
|
1352
|
+
var ResponseFormat = z.union([
|
|
1353
|
+
z.object({ type: z.literal("json_object") }),
|
|
1354
|
+
z.object({
|
|
1355
|
+
type: z.literal("json_schema"),
|
|
1356
|
+
json_schema: ResponseFormatJsonSchema
|
|
1357
|
+
}),
|
|
1358
|
+
z.object({ type: z.literal("text") })
|
|
1359
|
+
]);
|
|
1321
1360
|
var Role = z.object({
|
|
1322
1361
|
id: z.string().uuid(),
|
|
1323
1362
|
org_id: z.union([z.string(), z.null()]).optional(),
|
|
@@ -1377,10 +1416,9 @@ var ServiceToken = z.object({
|
|
|
1377
1416
|
created: z.union([z.string(), z.null()]).optional(),
|
|
1378
1417
|
name: z.string(),
|
|
1379
1418
|
preview_name: z.string(),
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
user_family_name: z.union([z.string(), z.null()]).optional(),
|
|
1419
|
+
service_account_id: z.union([z.string(), z.null()]).optional(),
|
|
1420
|
+
service_account_email: z.union([z.string(), z.null()]).optional(),
|
|
1421
|
+
service_account_name: z.union([z.string(), z.null()]).optional(),
|
|
1384
1422
|
org_id: z.union([z.string(), z.null()]).optional()
|
|
1385
1423
|
});
|
|
1386
1424
|
var SpanIFrame = z.object({
|
|
@@ -1401,7 +1439,7 @@ var SSEConsoleEventData = z.object({
|
|
|
1401
1439
|
var SSEProgressEventData = z.object({
|
|
1402
1440
|
id: z.string(),
|
|
1403
1441
|
object_type: FunctionObjectType,
|
|
1404
|
-
origin:
|
|
1442
|
+
origin: ObjectReferenceNullish.and(z.unknown()).optional(),
|
|
1405
1443
|
format: FunctionFormat,
|
|
1406
1444
|
output_type: FunctionOutputType,
|
|
1407
1445
|
name: z.string(),
|
package/dist/browser.d.mts
CHANGED
|
@@ -1124,26 +1124,6 @@ declare const ChatCompletionTool: z.ZodObject<{
|
|
|
1124
1124
|
type: "function";
|
|
1125
1125
|
}>;
|
|
1126
1126
|
type ChatCompletionToolType = z.infer<typeof ChatCompletionTool>;
|
|
1127
|
-
declare const ObjectReference: z.ZodUnion<[z.ZodObject<{
|
|
1128
|
-
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
1129
|
-
object_id: z.ZodString;
|
|
1130
|
-
id: z.ZodString;
|
|
1131
|
-
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1132
|
-
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1133
|
-
}, "strip", z.ZodTypeAny, {
|
|
1134
|
-
id: string;
|
|
1135
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1136
|
-
object_id: string;
|
|
1137
|
-
created?: string | null | undefined;
|
|
1138
|
-
_xact_id?: string | null | undefined;
|
|
1139
|
-
}, {
|
|
1140
|
-
id: string;
|
|
1141
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1142
|
-
object_id: string;
|
|
1143
|
-
created?: string | null | undefined;
|
|
1144
|
-
_xact_id?: string | null | undefined;
|
|
1145
|
-
}>, z.ZodNull]>;
|
|
1146
|
-
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
1147
1127
|
declare const RepoInfo: z.ZodUnion<[z.ZodObject<{
|
|
1148
1128
|
commit: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1149
1129
|
branch: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -5211,6 +5191,26 @@ declare const IfExists: z.ZodEnum<["error", "ignore", "replace"]>;
|
|
|
5211
5191
|
type IfExistsType = z.infer<typeof IfExists>;
|
|
5212
5192
|
declare const StreamingMode: z.ZodUnion<[z.ZodEnum<["auto", "parallel"]>, z.ZodNull]>;
|
|
5213
5193
|
type StreamingModeType = z.infer<typeof StreamingMode>;
|
|
5194
|
+
declare const ObjectReference: z.ZodObject<{
|
|
5195
|
+
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
5196
|
+
object_id: z.ZodString;
|
|
5197
|
+
id: z.ZodString;
|
|
5198
|
+
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
5199
|
+
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
5200
|
+
}, "strip", z.ZodTypeAny, {
|
|
5201
|
+
id: string;
|
|
5202
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
5203
|
+
object_id: string;
|
|
5204
|
+
created?: string | null | undefined;
|
|
5205
|
+
_xact_id?: string | null | undefined;
|
|
5206
|
+
}, {
|
|
5207
|
+
id: string;
|
|
5208
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
5209
|
+
object_id: string;
|
|
5210
|
+
created?: string | null | undefined;
|
|
5211
|
+
_xact_id?: string | null | undefined;
|
|
5212
|
+
}>;
|
|
5213
|
+
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
5214
5214
|
declare const Prompt$1: z.ZodObject<{
|
|
5215
5215
|
id: z.ZodString;
|
|
5216
5216
|
_xact_id: z.ZodString;
|
package/dist/browser.d.ts
CHANGED
|
@@ -1124,26 +1124,6 @@ declare const ChatCompletionTool: z.ZodObject<{
|
|
|
1124
1124
|
type: "function";
|
|
1125
1125
|
}>;
|
|
1126
1126
|
type ChatCompletionToolType = z.infer<typeof ChatCompletionTool>;
|
|
1127
|
-
declare const ObjectReference: z.ZodUnion<[z.ZodObject<{
|
|
1128
|
-
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
1129
|
-
object_id: z.ZodString;
|
|
1130
|
-
id: z.ZodString;
|
|
1131
|
-
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1132
|
-
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1133
|
-
}, "strip", z.ZodTypeAny, {
|
|
1134
|
-
id: string;
|
|
1135
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1136
|
-
object_id: string;
|
|
1137
|
-
created?: string | null | undefined;
|
|
1138
|
-
_xact_id?: string | null | undefined;
|
|
1139
|
-
}, {
|
|
1140
|
-
id: string;
|
|
1141
|
-
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
1142
|
-
object_id: string;
|
|
1143
|
-
created?: string | null | undefined;
|
|
1144
|
-
_xact_id?: string | null | undefined;
|
|
1145
|
-
}>, z.ZodNull]>;
|
|
1146
|
-
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
1147
1127
|
declare const RepoInfo: z.ZodUnion<[z.ZodObject<{
|
|
1148
1128
|
commit: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1149
1129
|
branch: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -5211,6 +5191,26 @@ declare const IfExists: z.ZodEnum<["error", "ignore", "replace"]>;
|
|
|
5211
5191
|
type IfExistsType = z.infer<typeof IfExists>;
|
|
5212
5192
|
declare const StreamingMode: z.ZodUnion<[z.ZodEnum<["auto", "parallel"]>, z.ZodNull]>;
|
|
5213
5193
|
type StreamingModeType = z.infer<typeof StreamingMode>;
|
|
5194
|
+
declare const ObjectReference: z.ZodObject<{
|
|
5195
|
+
object_type: z.ZodEnum<["project_logs", "experiment", "dataset", "prompt", "function", "prompt_session"]>;
|
|
5196
|
+
object_id: z.ZodString;
|
|
5197
|
+
id: z.ZodString;
|
|
5198
|
+
_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
5199
|
+
created: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
5200
|
+
}, "strip", z.ZodTypeAny, {
|
|
5201
|
+
id: string;
|
|
5202
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
5203
|
+
object_id: string;
|
|
5204
|
+
created?: string | null | undefined;
|
|
5205
|
+
_xact_id?: string | null | undefined;
|
|
5206
|
+
}, {
|
|
5207
|
+
id: string;
|
|
5208
|
+
object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
|
|
5209
|
+
object_id: string;
|
|
5210
|
+
created?: string | null | undefined;
|
|
5211
|
+
_xact_id?: string | null | undefined;
|
|
5212
|
+
}>;
|
|
5213
|
+
type ObjectReferenceType = z.infer<typeof ObjectReference>;
|
|
5214
5214
|
declare const Prompt$1: z.ZodObject<{
|
|
5215
5215
|
id: z.ZodString;
|
|
5216
5216
|
_xact_id: z.ZodString;
|