braintrust 0.4.9 → 0.4.10
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 +919 -121
- package/dev/dist/index.d.ts +919 -121
- package/dev/dist/index.js +77 -22
- package/dev/dist/index.mjs +77 -22
- package/dist/browser.d.mts +1656 -235
- package/dist/browser.d.ts +1656 -235
- package/dist/browser.js +77 -22
- package/dist/browser.mjs +77 -22
- package/dist/cli.js +80 -26
- package/dist/index.d.mts +2448 -387
- package/dist/index.d.ts +2448 -387
- package/dist/index.js +117 -297
- package/dist/index.mjs +93 -273
- package/package.json +3 -4
package/dist/browser.js
CHANGED
|
@@ -1489,7 +1489,7 @@ var init_util = __esm({
|
|
|
1489
1489
|
|
|
1490
1490
|
// src/generated_types.ts
|
|
1491
1491
|
|
|
1492
|
-
var AclObjectType, Permission, Acl, AISecret, ResponseFormatJsonSchema, ResponseFormatNullish, AnyModelParams, ApiKey, AsyncScoringState, AsyncScoringControl, BraintrustAttachmentReference, ExternalAttachmentReference, AttachmentReference, UploadStatus, AttachmentStatus, BraintrustModelParams, CallEvent, ChatCompletionContentPartTextWithTitle, ChatCompletionContentPartImageWithTitle, ChatCompletionContentPart, ChatCompletionContentPartText, ChatCompletionMessageToolCall, ChatCompletionMessageReasoning, ChatCompletionMessageParam, ChatCompletionOpenAIMessageParam, ChatCompletionTool, CodeBundle, Dataset, ObjectReferenceNullish, DatasetEvent, EnvVar, RepoInfo, Experiment, SpanType, SpanAttributes, ExperimentEvent, ExtendedSavedFunctionId, PromptBlockDataNullish, ModelParams, PromptOptionsNullish, PromptParserNullish, SavedFunctionId, PromptDataNullish, FunctionTypeEnumNullish, FunctionIdRef, PromptBlockData, GraphNode, GraphEdge, GraphData, FunctionData, Function, FunctionFormat, PromptData, FunctionTypeEnum, FunctionId, FunctionObjectType, FunctionOutputType, GitMetadataSettings, Group, IfExists, InvokeParent, StreamingMode, InvokeFunction, MessageRole, ObjectReference, OnlineScoreConfig, Organization, ProjectSettings, Project, RetentionObjectType, ProjectAutomation, ProjectLogsEvent, ProjectScoreType, ProjectScoreCategory, ProjectScoreCategories, ProjectScoreConfig, ProjectScore, ProjectTag, Prompt, PromptOptions, PromptSessionEvent, ResponseFormat, Role, RunEval, ServiceToken, SpanIFrame, SSEConsoleEventData, SSEProgressEventData, ToolFunctionDefinition, User, ViewDataSearch, ViewData, ViewOptions, View;
|
|
1492
|
+
var AclObjectType, Permission, Acl, AISecret, ResponseFormatJsonSchema, ResponseFormatNullish, AnyModelParams, ApiKey, AsyncScoringState, AsyncScoringControl, BraintrustAttachmentReference, ExternalAttachmentReference, AttachmentReference, UploadStatus, AttachmentStatus, BraintrustModelParams, CallEvent, ChatCompletionContentPartTextWithTitle, ChatCompletionContentPartImageWithTitle, ChatCompletionContentPartFileFile, ChatCompletionContentPartFileWithTitle, ChatCompletionContentPart, ChatCompletionContentPartText, ChatCompletionMessageToolCall, ChatCompletionMessageReasoning, ChatCompletionMessageParam, ChatCompletionOpenAIMessageParam, ChatCompletionTool, CodeBundle, Dataset, ObjectReferenceNullish, DatasetEvent, EnvVar, RepoInfo, Experiment, SpanType, SpanAttributes, ExperimentEvent, ExtendedSavedFunctionId, PromptBlockDataNullish, ModelParams, PromptOptionsNullish, PromptParserNullish, SavedFunctionId, PromptDataNullish, FunctionTypeEnumNullish, FunctionIdRef, PromptBlockData, GraphNode, GraphEdge, GraphData, FunctionData, Function, FunctionFormat, PromptData, FunctionTypeEnum, FunctionId, FunctionObjectType, FunctionOutputType, GitMetadataSettings, Group, IfExists, InvokeParent, StreamingMode, InvokeFunction, MessageRole, ObjectReference, OnlineScoreConfig, Organization, ProjectSettings, Project, RetentionObjectType, ProjectAutomation, ProjectLogsEvent, ProjectScoreType, ProjectScoreCategory, ProjectScoreCategories, ProjectScoreConfig, ProjectScore, ProjectTag, Prompt, PromptOptions, PromptSessionEvent, ResponseFormat, Role, RunEval, ServiceToken, SpanIFrame, SSEConsoleEventData, SSEProgressEventData, ToolFunctionDefinition, User, ViewDataSearch, ViewData, ViewOptions, View;
|
|
1493
1493
|
var init_generated_types = __esm({
|
|
1494
1494
|
"src/generated_types.ts"() {
|
|
1495
1495
|
"use strict";
|
|
@@ -1580,10 +1580,12 @@ var init_generated_types = __esm({
|
|
|
1580
1580
|
]).optional(),
|
|
1581
1581
|
n: _v3.z.number().optional(),
|
|
1582
1582
|
stop: _v3.z.array(_v3.z.string()).optional(),
|
|
1583
|
-
reasoning_effort: _v3.z.enum(["minimal", "low", "medium", "high"]).optional(),
|
|
1583
|
+
reasoning_effort: _v3.z.enum(["none", "minimal", "low", "medium", "high"]).optional(),
|
|
1584
1584
|
verbosity: _v3.z.enum(["low", "medium", "high"]).optional(),
|
|
1585
1585
|
top_k: _v3.z.number().optional(),
|
|
1586
1586
|
stop_sequences: _v3.z.array(_v3.z.string()).optional(),
|
|
1587
|
+
reasoning_enabled: _v3.z.boolean().optional(),
|
|
1588
|
+
reasoning_budget: _v3.z.number().optional(),
|
|
1587
1589
|
max_tokens_to_sample: _v3.z.number().optional(),
|
|
1588
1590
|
maxOutputTokens: _v3.z.number().optional(),
|
|
1589
1591
|
topP: _v3.z.number().optional(),
|
|
@@ -1639,7 +1641,11 @@ var init_generated_types = __esm({
|
|
|
1639
1641
|
upload_status: UploadStatus,
|
|
1640
1642
|
error_message: _v3.z.string().optional()
|
|
1641
1643
|
});
|
|
1642
|
-
BraintrustModelParams = _v3.z.object({
|
|
1644
|
+
BraintrustModelParams = _v3.z.object({
|
|
1645
|
+
use_cache: _v3.z.boolean(),
|
|
1646
|
+
reasoning_enabled: _v3.z.boolean(),
|
|
1647
|
+
reasoning_budget: _v3.z.number()
|
|
1648
|
+
}).partial();
|
|
1643
1649
|
CallEvent = _v3.z.union([
|
|
1644
1650
|
_v3.z.object({
|
|
1645
1651
|
id: _v3.z.string().optional(),
|
|
@@ -1694,9 +1700,15 @@ var init_generated_types = __esm({
|
|
|
1694
1700
|
}),
|
|
1695
1701
|
type: _v3.z.literal("image_url")
|
|
1696
1702
|
});
|
|
1703
|
+
ChatCompletionContentPartFileFile = _v3.z.object({ file_data: _v3.z.string(), filename: _v3.z.string(), file_id: _v3.z.string() }).partial();
|
|
1704
|
+
ChatCompletionContentPartFileWithTitle = _v3.z.object({
|
|
1705
|
+
file: ChatCompletionContentPartFileFile,
|
|
1706
|
+
type: _v3.z.literal("file")
|
|
1707
|
+
});
|
|
1697
1708
|
ChatCompletionContentPart = _v3.z.union([
|
|
1698
1709
|
ChatCompletionContentPartTextWithTitle,
|
|
1699
|
-
ChatCompletionContentPartImageWithTitle
|
|
1710
|
+
ChatCompletionContentPartImageWithTitle,
|
|
1711
|
+
ChatCompletionContentPartFileWithTitle
|
|
1700
1712
|
]);
|
|
1701
1713
|
ChatCompletionContentPartText = _v3.z.object({
|
|
1702
1714
|
text: _v3.z.string().default(""),
|
|
@@ -1793,7 +1805,7 @@ var init_generated_types = __esm({
|
|
|
1793
1805
|
});
|
|
1794
1806
|
CodeBundle = _v3.z.object({
|
|
1795
1807
|
runtime_context: _v3.z.object({
|
|
1796
|
-
runtime: _v3.z.enum(["node", "python"]),
|
|
1808
|
+
runtime: _v3.z.enum(["node", "python", "browser"]),
|
|
1797
1809
|
version: _v3.z.string()
|
|
1798
1810
|
}),
|
|
1799
1811
|
location: _v3.z.union([
|
|
@@ -1854,7 +1866,9 @@ var init_generated_types = __esm({
|
|
|
1854
1866
|
span_id: _v3.z.string(),
|
|
1855
1867
|
root_span_id: _v3.z.string(),
|
|
1856
1868
|
is_root: _v3.z.union([_v3.z.boolean(), _v3.z.null()]).optional(),
|
|
1857
|
-
origin: ObjectReferenceNullish.optional()
|
|
1869
|
+
origin: ObjectReferenceNullish.optional(),
|
|
1870
|
+
comments: _v3.z.union([_v3.z.array(_v3.z.unknown()), _v3.z.null()]).optional(),
|
|
1871
|
+
audit_data: _v3.z.union([_v3.z.array(_v3.z.unknown()), _v3.z.null()]).optional()
|
|
1858
1872
|
});
|
|
1859
1873
|
EnvVar = _v3.z.object({
|
|
1860
1874
|
id: _v3.z.string().uuid(),
|
|
@@ -1934,7 +1948,9 @@ var init_generated_types = __esm({
|
|
|
1934
1948
|
root_span_id: _v3.z.string(),
|
|
1935
1949
|
span_attributes: SpanAttributes.optional(),
|
|
1936
1950
|
is_root: _v3.z.union([_v3.z.boolean(), _v3.z.null()]).optional(),
|
|
1937
|
-
origin: ObjectReferenceNullish.optional()
|
|
1951
|
+
origin: ObjectReferenceNullish.optional(),
|
|
1952
|
+
comments: _v3.z.union([_v3.z.array(_v3.z.unknown()), _v3.z.null()]).optional(),
|
|
1953
|
+
audit_data: _v3.z.union([_v3.z.array(_v3.z.unknown()), _v3.z.null()]).optional()
|
|
1938
1954
|
});
|
|
1939
1955
|
ExtendedSavedFunctionId = _v3.z.union([
|
|
1940
1956
|
_v3.z.object({ type: _v3.z.literal("function"), id: _v3.z.string() }),
|
|
@@ -1946,17 +1962,19 @@ var init_generated_types = __esm({
|
|
|
1946
1962
|
})
|
|
1947
1963
|
]);
|
|
1948
1964
|
PromptBlockDataNullish = _v3.z.union([
|
|
1949
|
-
_v3.z.object({ type: _v3.z.literal("completion"), content: _v3.z.string() }),
|
|
1950
1965
|
_v3.z.object({
|
|
1951
1966
|
type: _v3.z.literal("chat"),
|
|
1952
1967
|
messages: _v3.z.array(ChatCompletionMessageParam),
|
|
1953
1968
|
tools: _v3.z.string().optional()
|
|
1954
1969
|
}),
|
|
1970
|
+
_v3.z.object({ type: _v3.z.literal("completion"), content: _v3.z.string() }),
|
|
1955
1971
|
_v3.z.null()
|
|
1956
1972
|
]);
|
|
1957
1973
|
ModelParams = _v3.z.union([
|
|
1958
1974
|
_v3.z.object({
|
|
1959
1975
|
use_cache: _v3.z.boolean(),
|
|
1976
|
+
reasoning_enabled: _v3.z.boolean(),
|
|
1977
|
+
reasoning_budget: _v3.z.number(),
|
|
1960
1978
|
temperature: _v3.z.number(),
|
|
1961
1979
|
top_p: _v3.z.number(),
|
|
1962
1980
|
max_tokens: _v3.z.number(),
|
|
@@ -1980,11 +1998,13 @@ var init_generated_types = __esm({
|
|
|
1980
1998
|
]),
|
|
1981
1999
|
n: _v3.z.number(),
|
|
1982
2000
|
stop: _v3.z.array(_v3.z.string()),
|
|
1983
|
-
reasoning_effort: _v3.z.enum(["minimal", "low", "medium", "high"]),
|
|
2001
|
+
reasoning_effort: _v3.z.enum(["none", "minimal", "low", "medium", "high"]),
|
|
1984
2002
|
verbosity: _v3.z.enum(["low", "medium", "high"])
|
|
1985
2003
|
}).partial().passthrough(),
|
|
1986
2004
|
_v3.z.object({
|
|
1987
2005
|
use_cache: _v3.z.boolean().optional(),
|
|
2006
|
+
reasoning_enabled: _v3.z.boolean().optional(),
|
|
2007
|
+
reasoning_budget: _v3.z.number().optional(),
|
|
1988
2008
|
max_tokens: _v3.z.number(),
|
|
1989
2009
|
temperature: _v3.z.number(),
|
|
1990
2010
|
top_p: _v3.z.number().optional(),
|
|
@@ -1994,6 +2014,8 @@ var init_generated_types = __esm({
|
|
|
1994
2014
|
}).passthrough(),
|
|
1995
2015
|
_v3.z.object({
|
|
1996
2016
|
use_cache: _v3.z.boolean(),
|
|
2017
|
+
reasoning_enabled: _v3.z.boolean(),
|
|
2018
|
+
reasoning_budget: _v3.z.number(),
|
|
1997
2019
|
temperature: _v3.z.number(),
|
|
1998
2020
|
maxOutputTokens: _v3.z.number(),
|
|
1999
2021
|
topP: _v3.z.number(),
|
|
@@ -2001,10 +2023,16 @@ var init_generated_types = __esm({
|
|
|
2001
2023
|
}).partial().passthrough(),
|
|
2002
2024
|
_v3.z.object({
|
|
2003
2025
|
use_cache: _v3.z.boolean(),
|
|
2026
|
+
reasoning_enabled: _v3.z.boolean(),
|
|
2027
|
+
reasoning_budget: _v3.z.number(),
|
|
2004
2028
|
temperature: _v3.z.number(),
|
|
2005
2029
|
topK: _v3.z.number()
|
|
2006
2030
|
}).partial().passthrough(),
|
|
2007
|
-
_v3.z.object({
|
|
2031
|
+
_v3.z.object({
|
|
2032
|
+
use_cache: _v3.z.boolean(),
|
|
2033
|
+
reasoning_enabled: _v3.z.boolean(),
|
|
2034
|
+
reasoning_budget: _v3.z.number()
|
|
2035
|
+
}).partial().passthrough()
|
|
2008
2036
|
]);
|
|
2009
2037
|
PromptOptionsNullish = _v3.z.union([
|
|
2010
2038
|
_v3.z.object({ model: _v3.z.string(), params: ModelParams, position: _v3.z.string() }).partial(),
|
|
@@ -2040,17 +2068,17 @@ var init_generated_types = __esm({
|
|
|
2040
2068
|
_v3.z.null()
|
|
2041
2069
|
]);
|
|
2042
2070
|
FunctionTypeEnumNullish = _v3.z.union([
|
|
2043
|
-
_v3.z.enum(["llm", "scorer", "task", "tool"]),
|
|
2071
|
+
_v3.z.enum(["llm", "scorer", "task", "tool", "custom_view"]),
|
|
2044
2072
|
_v3.z.null()
|
|
2045
2073
|
]);
|
|
2046
2074
|
FunctionIdRef = _v3.z.object({}).partial().passthrough();
|
|
2047
2075
|
PromptBlockData = _v3.z.union([
|
|
2048
|
-
_v3.z.object({ type: _v3.z.literal("completion"), content: _v3.z.string() }),
|
|
2049
2076
|
_v3.z.object({
|
|
2050
2077
|
type: _v3.z.literal("chat"),
|
|
2051
2078
|
messages: _v3.z.array(ChatCompletionMessageParam),
|
|
2052
2079
|
tools: _v3.z.string().optional()
|
|
2053
|
-
})
|
|
2080
|
+
}),
|
|
2081
|
+
_v3.z.object({ type: _v3.z.literal("completion"), content: _v3.z.string() })
|
|
2054
2082
|
]);
|
|
2055
2083
|
GraphNode = _v3.z.union([
|
|
2056
2084
|
_v3.z.object({
|
|
@@ -2118,7 +2146,7 @@ var init_generated_types = __esm({
|
|
|
2118
2146
|
_v3.z.object({
|
|
2119
2147
|
type: _v3.z.literal("inline"),
|
|
2120
2148
|
runtime_context: _v3.z.object({
|
|
2121
|
-
runtime: _v3.z.enum(["node", "python"]),
|
|
2149
|
+
runtime: _v3.z.enum(["node", "python", "browser"]),
|
|
2122
2150
|
version: _v3.z.string()
|
|
2123
2151
|
}),
|
|
2124
2152
|
code: _v3.z.string()
|
|
@@ -2177,7 +2205,13 @@ var init_generated_types = __esm({
|
|
|
2177
2205
|
_v3.z.null()
|
|
2178
2206
|
])
|
|
2179
2207
|
}).partial();
|
|
2180
|
-
FunctionTypeEnum = _v3.z.enum([
|
|
2208
|
+
FunctionTypeEnum = _v3.z.enum([
|
|
2209
|
+
"llm",
|
|
2210
|
+
"scorer",
|
|
2211
|
+
"task",
|
|
2212
|
+
"tool",
|
|
2213
|
+
"custom_view"
|
|
2214
|
+
]);
|
|
2181
2215
|
FunctionId = _v3.z.union([
|
|
2182
2216
|
_v3.z.object({ function_id: _v3.z.string(), version: _v3.z.string().optional() }),
|
|
2183
2217
|
_v3.z.object({
|
|
@@ -2193,7 +2227,7 @@ var init_generated_types = __esm({
|
|
|
2193
2227
|
}),
|
|
2194
2228
|
_v3.z.object({
|
|
2195
2229
|
inline_context: _v3.z.object({
|
|
2196
|
-
runtime: _v3.z.enum(["node", "python"]),
|
|
2230
|
+
runtime: _v3.z.enum(["node", "python", "browser"]),
|
|
2197
2231
|
version: _v3.z.string()
|
|
2198
2232
|
}),
|
|
2199
2233
|
code: _v3.z.string(),
|
|
@@ -2216,7 +2250,8 @@ var init_generated_types = __esm({
|
|
|
2216
2250
|
"tool",
|
|
2217
2251
|
"scorer",
|
|
2218
2252
|
"task",
|
|
2219
|
-
"agent"
|
|
2253
|
+
"agent",
|
|
2254
|
+
"custom_view"
|
|
2220
2255
|
]);
|
|
2221
2256
|
FunctionOutputType = _v3.z.enum(["completion", "score", "any"]);
|
|
2222
2257
|
GitMetadataSettings = _v3.z.object({
|
|
@@ -2344,7 +2379,8 @@ var init_generated_types = __esm({
|
|
|
2344
2379
|
})
|
|
2345
2380
|
),
|
|
2346
2381
|
_v3.z.null()
|
|
2347
|
-
])
|
|
2382
|
+
]),
|
|
2383
|
+
disable_realtime_queries: _v3.z.union([_v3.z.boolean(), _v3.z.null()])
|
|
2348
2384
|
}).partial(),
|
|
2349
2385
|
_v3.z.null()
|
|
2350
2386
|
]);
|
|
@@ -2432,7 +2468,10 @@ var init_generated_types = __esm({
|
|
|
2432
2468
|
root_span_id: _v3.z.string(),
|
|
2433
2469
|
is_root: _v3.z.union([_v3.z.boolean(), _v3.z.null()]).optional(),
|
|
2434
2470
|
span_attributes: SpanAttributes.optional(),
|
|
2435
|
-
origin: ObjectReferenceNullish.optional()
|
|
2471
|
+
origin: ObjectReferenceNullish.optional(),
|
|
2472
|
+
comments: _v3.z.union([_v3.z.array(_v3.z.unknown()), _v3.z.null()]).optional(),
|
|
2473
|
+
audit_data: _v3.z.union([_v3.z.array(_v3.z.unknown()), _v3.z.null()]).optional(),
|
|
2474
|
+
_async_scoring_state: _v3.z.unknown().optional()
|
|
2436
2475
|
});
|
|
2437
2476
|
ProjectScoreType = _v3.z.enum([
|
|
2438
2477
|
"slider",
|
|
@@ -2647,7 +2686,7 @@ var init_generated_types = __esm({
|
|
|
2647
2686
|
_v3.z.null()
|
|
2648
2687
|
]);
|
|
2649
2688
|
ViewData = _v3.z.union([
|
|
2650
|
-
_v3.z.object({ search: ViewDataSearch }).partial(),
|
|
2689
|
+
_v3.z.object({ search: ViewDataSearch, custom_charts: _v3.z.unknown() }).partial(),
|
|
2651
2690
|
_v3.z.null()
|
|
2652
2691
|
]);
|
|
2653
2692
|
ViewOptions = _v3.z.union([
|
|
@@ -2713,7 +2752,8 @@ var init_generated_types = __esm({
|
|
|
2713
2752
|
_v3.z.string(),
|
|
2714
2753
|
_v3.z.object({ from: _v3.z.string(), to: _v3.z.string() }),
|
|
2715
2754
|
_v3.z.null()
|
|
2716
|
-
])
|
|
2755
|
+
]),
|
|
2756
|
+
queryShape: _v3.z.union([_v3.z.enum(["traces", "spans"]), _v3.z.null()])
|
|
2717
2757
|
}).partial(),
|
|
2718
2758
|
_v3.z.null()
|
|
2719
2759
|
]);
|
|
@@ -2734,7 +2774,8 @@ var init_generated_types = __esm({
|
|
|
2734
2774
|
"scorers",
|
|
2735
2775
|
"logs",
|
|
2736
2776
|
"agents",
|
|
2737
|
-
"monitor"
|
|
2777
|
+
"monitor",
|
|
2778
|
+
"for_review"
|
|
2738
2779
|
]),
|
|
2739
2780
|
name: _v3.z.string(),
|
|
2740
2781
|
created: _v3.z.union([_v3.z.string(), _v3.z.null()]).optional(),
|
|
@@ -6750,6 +6791,19 @@ function renderMessage(render, message) {
|
|
|
6750
6791
|
url: render(c.image_url.url)
|
|
6751
6792
|
}
|
|
6752
6793
|
};
|
|
6794
|
+
case "file":
|
|
6795
|
+
return {
|
|
6796
|
+
...c,
|
|
6797
|
+
file: {
|
|
6798
|
+
file_data: render(c.file.file_data || ""),
|
|
6799
|
+
...c.file.file_id && {
|
|
6800
|
+
file_id: render(c.file.file_id)
|
|
6801
|
+
},
|
|
6802
|
+
...c.file.filename && {
|
|
6803
|
+
filename: render(c.file.filename)
|
|
6804
|
+
}
|
|
6805
|
+
}
|
|
6806
|
+
};
|
|
6753
6807
|
default:
|
|
6754
6808
|
const _exhaustiveCheck = c;
|
|
6755
6809
|
return _exhaustiveCheck;
|
|
@@ -8508,6 +8562,7 @@ Error: ${errorText}`;
|
|
|
8508
8562
|
},
|
|
8509
8563
|
use_columnstore: false,
|
|
8510
8564
|
brainstore_realtime: true,
|
|
8565
|
+
query_source: `js_sdk_object_fetcher_${this.objectType}`,
|
|
8511
8566
|
...this.pinnedVersion !== void 0 ? {
|
|
8512
8567
|
version: this.pinnedVersion
|
|
8513
8568
|
} : {}
|
package/dist/browser.mjs
CHANGED
|
@@ -1489,7 +1489,7 @@ var init_util = __esm({
|
|
|
1489
1489
|
|
|
1490
1490
|
// src/generated_types.ts
|
|
1491
1491
|
import { z as z6 } from "zod/v3";
|
|
1492
|
-
var AclObjectType, Permission, Acl, AISecret, ResponseFormatJsonSchema, ResponseFormatNullish, AnyModelParams, ApiKey, AsyncScoringState, AsyncScoringControl, BraintrustAttachmentReference, ExternalAttachmentReference, AttachmentReference, UploadStatus, AttachmentStatus, BraintrustModelParams, CallEvent, ChatCompletionContentPartTextWithTitle, ChatCompletionContentPartImageWithTitle, ChatCompletionContentPart, ChatCompletionContentPartText, ChatCompletionMessageToolCall, ChatCompletionMessageReasoning, ChatCompletionMessageParam, ChatCompletionOpenAIMessageParam, ChatCompletionTool, CodeBundle, Dataset, ObjectReferenceNullish, DatasetEvent, EnvVar, RepoInfo, Experiment, SpanType, SpanAttributes, ExperimentEvent, ExtendedSavedFunctionId, PromptBlockDataNullish, ModelParams, PromptOptionsNullish, PromptParserNullish, SavedFunctionId, PromptDataNullish, FunctionTypeEnumNullish, FunctionIdRef, PromptBlockData, GraphNode, GraphEdge, GraphData, FunctionData, Function, FunctionFormat, PromptData, FunctionTypeEnum, FunctionId, FunctionObjectType, FunctionOutputType, GitMetadataSettings, Group, IfExists, InvokeParent, StreamingMode, InvokeFunction, MessageRole, ObjectReference, OnlineScoreConfig, Organization, ProjectSettings, Project, RetentionObjectType, ProjectAutomation, ProjectLogsEvent, ProjectScoreType, ProjectScoreCategory, ProjectScoreCategories, ProjectScoreConfig, ProjectScore, ProjectTag, Prompt, PromptOptions, PromptSessionEvent, ResponseFormat, Role, RunEval, ServiceToken, SpanIFrame, SSEConsoleEventData, SSEProgressEventData, ToolFunctionDefinition, User, ViewDataSearch, ViewData, ViewOptions, View;
|
|
1492
|
+
var AclObjectType, Permission, Acl, AISecret, ResponseFormatJsonSchema, ResponseFormatNullish, AnyModelParams, ApiKey, AsyncScoringState, AsyncScoringControl, BraintrustAttachmentReference, ExternalAttachmentReference, AttachmentReference, UploadStatus, AttachmentStatus, BraintrustModelParams, CallEvent, ChatCompletionContentPartTextWithTitle, ChatCompletionContentPartImageWithTitle, ChatCompletionContentPartFileFile, ChatCompletionContentPartFileWithTitle, ChatCompletionContentPart, ChatCompletionContentPartText, ChatCompletionMessageToolCall, ChatCompletionMessageReasoning, ChatCompletionMessageParam, ChatCompletionOpenAIMessageParam, ChatCompletionTool, CodeBundle, Dataset, ObjectReferenceNullish, DatasetEvent, EnvVar, RepoInfo, Experiment, SpanType, SpanAttributes, ExperimentEvent, ExtendedSavedFunctionId, PromptBlockDataNullish, ModelParams, PromptOptionsNullish, PromptParserNullish, SavedFunctionId, PromptDataNullish, FunctionTypeEnumNullish, FunctionIdRef, PromptBlockData, GraphNode, GraphEdge, GraphData, FunctionData, Function, FunctionFormat, PromptData, FunctionTypeEnum, FunctionId, FunctionObjectType, FunctionOutputType, GitMetadataSettings, Group, IfExists, InvokeParent, StreamingMode, InvokeFunction, MessageRole, ObjectReference, OnlineScoreConfig, Organization, ProjectSettings, Project, RetentionObjectType, ProjectAutomation, ProjectLogsEvent, ProjectScoreType, ProjectScoreCategory, ProjectScoreCategories, ProjectScoreConfig, ProjectScore, ProjectTag, Prompt, PromptOptions, PromptSessionEvent, ResponseFormat, Role, RunEval, ServiceToken, SpanIFrame, SSEConsoleEventData, SSEProgressEventData, ToolFunctionDefinition, User, ViewDataSearch, ViewData, ViewOptions, View;
|
|
1493
1493
|
var init_generated_types = __esm({
|
|
1494
1494
|
"src/generated_types.ts"() {
|
|
1495
1495
|
"use strict";
|
|
@@ -1580,10 +1580,12 @@ var init_generated_types = __esm({
|
|
|
1580
1580
|
]).optional(),
|
|
1581
1581
|
n: z6.number().optional(),
|
|
1582
1582
|
stop: z6.array(z6.string()).optional(),
|
|
1583
|
-
reasoning_effort: z6.enum(["minimal", "low", "medium", "high"]).optional(),
|
|
1583
|
+
reasoning_effort: z6.enum(["none", "minimal", "low", "medium", "high"]).optional(),
|
|
1584
1584
|
verbosity: z6.enum(["low", "medium", "high"]).optional(),
|
|
1585
1585
|
top_k: z6.number().optional(),
|
|
1586
1586
|
stop_sequences: z6.array(z6.string()).optional(),
|
|
1587
|
+
reasoning_enabled: z6.boolean().optional(),
|
|
1588
|
+
reasoning_budget: z6.number().optional(),
|
|
1587
1589
|
max_tokens_to_sample: z6.number().optional(),
|
|
1588
1590
|
maxOutputTokens: z6.number().optional(),
|
|
1589
1591
|
topP: z6.number().optional(),
|
|
@@ -1639,7 +1641,11 @@ var init_generated_types = __esm({
|
|
|
1639
1641
|
upload_status: UploadStatus,
|
|
1640
1642
|
error_message: z6.string().optional()
|
|
1641
1643
|
});
|
|
1642
|
-
BraintrustModelParams = z6.object({
|
|
1644
|
+
BraintrustModelParams = z6.object({
|
|
1645
|
+
use_cache: z6.boolean(),
|
|
1646
|
+
reasoning_enabled: z6.boolean(),
|
|
1647
|
+
reasoning_budget: z6.number()
|
|
1648
|
+
}).partial();
|
|
1643
1649
|
CallEvent = z6.union([
|
|
1644
1650
|
z6.object({
|
|
1645
1651
|
id: z6.string().optional(),
|
|
@@ -1694,9 +1700,15 @@ var init_generated_types = __esm({
|
|
|
1694
1700
|
}),
|
|
1695
1701
|
type: z6.literal("image_url")
|
|
1696
1702
|
});
|
|
1703
|
+
ChatCompletionContentPartFileFile = z6.object({ file_data: z6.string(), filename: z6.string(), file_id: z6.string() }).partial();
|
|
1704
|
+
ChatCompletionContentPartFileWithTitle = z6.object({
|
|
1705
|
+
file: ChatCompletionContentPartFileFile,
|
|
1706
|
+
type: z6.literal("file")
|
|
1707
|
+
});
|
|
1697
1708
|
ChatCompletionContentPart = z6.union([
|
|
1698
1709
|
ChatCompletionContentPartTextWithTitle,
|
|
1699
|
-
ChatCompletionContentPartImageWithTitle
|
|
1710
|
+
ChatCompletionContentPartImageWithTitle,
|
|
1711
|
+
ChatCompletionContentPartFileWithTitle
|
|
1700
1712
|
]);
|
|
1701
1713
|
ChatCompletionContentPartText = z6.object({
|
|
1702
1714
|
text: z6.string().default(""),
|
|
@@ -1793,7 +1805,7 @@ var init_generated_types = __esm({
|
|
|
1793
1805
|
});
|
|
1794
1806
|
CodeBundle = z6.object({
|
|
1795
1807
|
runtime_context: z6.object({
|
|
1796
|
-
runtime: z6.enum(["node", "python"]),
|
|
1808
|
+
runtime: z6.enum(["node", "python", "browser"]),
|
|
1797
1809
|
version: z6.string()
|
|
1798
1810
|
}),
|
|
1799
1811
|
location: z6.union([
|
|
@@ -1854,7 +1866,9 @@ var init_generated_types = __esm({
|
|
|
1854
1866
|
span_id: z6.string(),
|
|
1855
1867
|
root_span_id: z6.string(),
|
|
1856
1868
|
is_root: z6.union([z6.boolean(), z6.null()]).optional(),
|
|
1857
|
-
origin: ObjectReferenceNullish.optional()
|
|
1869
|
+
origin: ObjectReferenceNullish.optional(),
|
|
1870
|
+
comments: z6.union([z6.array(z6.unknown()), z6.null()]).optional(),
|
|
1871
|
+
audit_data: z6.union([z6.array(z6.unknown()), z6.null()]).optional()
|
|
1858
1872
|
});
|
|
1859
1873
|
EnvVar = z6.object({
|
|
1860
1874
|
id: z6.string().uuid(),
|
|
@@ -1934,7 +1948,9 @@ var init_generated_types = __esm({
|
|
|
1934
1948
|
root_span_id: z6.string(),
|
|
1935
1949
|
span_attributes: SpanAttributes.optional(),
|
|
1936
1950
|
is_root: z6.union([z6.boolean(), z6.null()]).optional(),
|
|
1937
|
-
origin: ObjectReferenceNullish.optional()
|
|
1951
|
+
origin: ObjectReferenceNullish.optional(),
|
|
1952
|
+
comments: z6.union([z6.array(z6.unknown()), z6.null()]).optional(),
|
|
1953
|
+
audit_data: z6.union([z6.array(z6.unknown()), z6.null()]).optional()
|
|
1938
1954
|
});
|
|
1939
1955
|
ExtendedSavedFunctionId = z6.union([
|
|
1940
1956
|
z6.object({ type: z6.literal("function"), id: z6.string() }),
|
|
@@ -1946,17 +1962,19 @@ var init_generated_types = __esm({
|
|
|
1946
1962
|
})
|
|
1947
1963
|
]);
|
|
1948
1964
|
PromptBlockDataNullish = z6.union([
|
|
1949
|
-
z6.object({ type: z6.literal("completion"), content: z6.string() }),
|
|
1950
1965
|
z6.object({
|
|
1951
1966
|
type: z6.literal("chat"),
|
|
1952
1967
|
messages: z6.array(ChatCompletionMessageParam),
|
|
1953
1968
|
tools: z6.string().optional()
|
|
1954
1969
|
}),
|
|
1970
|
+
z6.object({ type: z6.literal("completion"), content: z6.string() }),
|
|
1955
1971
|
z6.null()
|
|
1956
1972
|
]);
|
|
1957
1973
|
ModelParams = z6.union([
|
|
1958
1974
|
z6.object({
|
|
1959
1975
|
use_cache: z6.boolean(),
|
|
1976
|
+
reasoning_enabled: z6.boolean(),
|
|
1977
|
+
reasoning_budget: z6.number(),
|
|
1960
1978
|
temperature: z6.number(),
|
|
1961
1979
|
top_p: z6.number(),
|
|
1962
1980
|
max_tokens: z6.number(),
|
|
@@ -1980,11 +1998,13 @@ var init_generated_types = __esm({
|
|
|
1980
1998
|
]),
|
|
1981
1999
|
n: z6.number(),
|
|
1982
2000
|
stop: z6.array(z6.string()),
|
|
1983
|
-
reasoning_effort: z6.enum(["minimal", "low", "medium", "high"]),
|
|
2001
|
+
reasoning_effort: z6.enum(["none", "minimal", "low", "medium", "high"]),
|
|
1984
2002
|
verbosity: z6.enum(["low", "medium", "high"])
|
|
1985
2003
|
}).partial().passthrough(),
|
|
1986
2004
|
z6.object({
|
|
1987
2005
|
use_cache: z6.boolean().optional(),
|
|
2006
|
+
reasoning_enabled: z6.boolean().optional(),
|
|
2007
|
+
reasoning_budget: z6.number().optional(),
|
|
1988
2008
|
max_tokens: z6.number(),
|
|
1989
2009
|
temperature: z6.number(),
|
|
1990
2010
|
top_p: z6.number().optional(),
|
|
@@ -1994,6 +2014,8 @@ var init_generated_types = __esm({
|
|
|
1994
2014
|
}).passthrough(),
|
|
1995
2015
|
z6.object({
|
|
1996
2016
|
use_cache: z6.boolean(),
|
|
2017
|
+
reasoning_enabled: z6.boolean(),
|
|
2018
|
+
reasoning_budget: z6.number(),
|
|
1997
2019
|
temperature: z6.number(),
|
|
1998
2020
|
maxOutputTokens: z6.number(),
|
|
1999
2021
|
topP: z6.number(),
|
|
@@ -2001,10 +2023,16 @@ var init_generated_types = __esm({
|
|
|
2001
2023
|
}).partial().passthrough(),
|
|
2002
2024
|
z6.object({
|
|
2003
2025
|
use_cache: z6.boolean(),
|
|
2026
|
+
reasoning_enabled: z6.boolean(),
|
|
2027
|
+
reasoning_budget: z6.number(),
|
|
2004
2028
|
temperature: z6.number(),
|
|
2005
2029
|
topK: z6.number()
|
|
2006
2030
|
}).partial().passthrough(),
|
|
2007
|
-
z6.object({
|
|
2031
|
+
z6.object({
|
|
2032
|
+
use_cache: z6.boolean(),
|
|
2033
|
+
reasoning_enabled: z6.boolean(),
|
|
2034
|
+
reasoning_budget: z6.number()
|
|
2035
|
+
}).partial().passthrough()
|
|
2008
2036
|
]);
|
|
2009
2037
|
PromptOptionsNullish = z6.union([
|
|
2010
2038
|
z6.object({ model: z6.string(), params: ModelParams, position: z6.string() }).partial(),
|
|
@@ -2040,17 +2068,17 @@ var init_generated_types = __esm({
|
|
|
2040
2068
|
z6.null()
|
|
2041
2069
|
]);
|
|
2042
2070
|
FunctionTypeEnumNullish = z6.union([
|
|
2043
|
-
z6.enum(["llm", "scorer", "task", "tool"]),
|
|
2071
|
+
z6.enum(["llm", "scorer", "task", "tool", "custom_view"]),
|
|
2044
2072
|
z6.null()
|
|
2045
2073
|
]);
|
|
2046
2074
|
FunctionIdRef = z6.object({}).partial().passthrough();
|
|
2047
2075
|
PromptBlockData = z6.union([
|
|
2048
|
-
z6.object({ type: z6.literal("completion"), content: z6.string() }),
|
|
2049
2076
|
z6.object({
|
|
2050
2077
|
type: z6.literal("chat"),
|
|
2051
2078
|
messages: z6.array(ChatCompletionMessageParam),
|
|
2052
2079
|
tools: z6.string().optional()
|
|
2053
|
-
})
|
|
2080
|
+
}),
|
|
2081
|
+
z6.object({ type: z6.literal("completion"), content: z6.string() })
|
|
2054
2082
|
]);
|
|
2055
2083
|
GraphNode = z6.union([
|
|
2056
2084
|
z6.object({
|
|
@@ -2118,7 +2146,7 @@ var init_generated_types = __esm({
|
|
|
2118
2146
|
z6.object({
|
|
2119
2147
|
type: z6.literal("inline"),
|
|
2120
2148
|
runtime_context: z6.object({
|
|
2121
|
-
runtime: z6.enum(["node", "python"]),
|
|
2149
|
+
runtime: z6.enum(["node", "python", "browser"]),
|
|
2122
2150
|
version: z6.string()
|
|
2123
2151
|
}),
|
|
2124
2152
|
code: z6.string()
|
|
@@ -2177,7 +2205,13 @@ var init_generated_types = __esm({
|
|
|
2177
2205
|
z6.null()
|
|
2178
2206
|
])
|
|
2179
2207
|
}).partial();
|
|
2180
|
-
FunctionTypeEnum = z6.enum([
|
|
2208
|
+
FunctionTypeEnum = z6.enum([
|
|
2209
|
+
"llm",
|
|
2210
|
+
"scorer",
|
|
2211
|
+
"task",
|
|
2212
|
+
"tool",
|
|
2213
|
+
"custom_view"
|
|
2214
|
+
]);
|
|
2181
2215
|
FunctionId = z6.union([
|
|
2182
2216
|
z6.object({ function_id: z6.string(), version: z6.string().optional() }),
|
|
2183
2217
|
z6.object({
|
|
@@ -2193,7 +2227,7 @@ var init_generated_types = __esm({
|
|
|
2193
2227
|
}),
|
|
2194
2228
|
z6.object({
|
|
2195
2229
|
inline_context: z6.object({
|
|
2196
|
-
runtime: z6.enum(["node", "python"]),
|
|
2230
|
+
runtime: z6.enum(["node", "python", "browser"]),
|
|
2197
2231
|
version: z6.string()
|
|
2198
2232
|
}),
|
|
2199
2233
|
code: z6.string(),
|
|
@@ -2216,7 +2250,8 @@ var init_generated_types = __esm({
|
|
|
2216
2250
|
"tool",
|
|
2217
2251
|
"scorer",
|
|
2218
2252
|
"task",
|
|
2219
|
-
"agent"
|
|
2253
|
+
"agent",
|
|
2254
|
+
"custom_view"
|
|
2220
2255
|
]);
|
|
2221
2256
|
FunctionOutputType = z6.enum(["completion", "score", "any"]);
|
|
2222
2257
|
GitMetadataSettings = z6.object({
|
|
@@ -2344,7 +2379,8 @@ var init_generated_types = __esm({
|
|
|
2344
2379
|
})
|
|
2345
2380
|
),
|
|
2346
2381
|
z6.null()
|
|
2347
|
-
])
|
|
2382
|
+
]),
|
|
2383
|
+
disable_realtime_queries: z6.union([z6.boolean(), z6.null()])
|
|
2348
2384
|
}).partial(),
|
|
2349
2385
|
z6.null()
|
|
2350
2386
|
]);
|
|
@@ -2432,7 +2468,10 @@ var init_generated_types = __esm({
|
|
|
2432
2468
|
root_span_id: z6.string(),
|
|
2433
2469
|
is_root: z6.union([z6.boolean(), z6.null()]).optional(),
|
|
2434
2470
|
span_attributes: SpanAttributes.optional(),
|
|
2435
|
-
origin: ObjectReferenceNullish.optional()
|
|
2471
|
+
origin: ObjectReferenceNullish.optional(),
|
|
2472
|
+
comments: z6.union([z6.array(z6.unknown()), z6.null()]).optional(),
|
|
2473
|
+
audit_data: z6.union([z6.array(z6.unknown()), z6.null()]).optional(),
|
|
2474
|
+
_async_scoring_state: z6.unknown().optional()
|
|
2436
2475
|
});
|
|
2437
2476
|
ProjectScoreType = z6.enum([
|
|
2438
2477
|
"slider",
|
|
@@ -2647,7 +2686,7 @@ var init_generated_types = __esm({
|
|
|
2647
2686
|
z6.null()
|
|
2648
2687
|
]);
|
|
2649
2688
|
ViewData = z6.union([
|
|
2650
|
-
z6.object({ search: ViewDataSearch }).partial(),
|
|
2689
|
+
z6.object({ search: ViewDataSearch, custom_charts: z6.unknown() }).partial(),
|
|
2651
2690
|
z6.null()
|
|
2652
2691
|
]);
|
|
2653
2692
|
ViewOptions = z6.union([
|
|
@@ -2713,7 +2752,8 @@ var init_generated_types = __esm({
|
|
|
2713
2752
|
z6.string(),
|
|
2714
2753
|
z6.object({ from: z6.string(), to: z6.string() }),
|
|
2715
2754
|
z6.null()
|
|
2716
|
-
])
|
|
2755
|
+
]),
|
|
2756
|
+
queryShape: z6.union([z6.enum(["traces", "spans"]), z6.null()])
|
|
2717
2757
|
}).partial(),
|
|
2718
2758
|
z6.null()
|
|
2719
2759
|
]);
|
|
@@ -2734,7 +2774,8 @@ var init_generated_types = __esm({
|
|
|
2734
2774
|
"scorers",
|
|
2735
2775
|
"logs",
|
|
2736
2776
|
"agents",
|
|
2737
|
-
"monitor"
|
|
2777
|
+
"monitor",
|
|
2778
|
+
"for_review"
|
|
2738
2779
|
]),
|
|
2739
2780
|
name: z6.string(),
|
|
2740
2781
|
created: z6.union([z6.string(), z6.null()]).optional(),
|
|
@@ -6750,6 +6791,19 @@ function renderMessage(render, message) {
|
|
|
6750
6791
|
url: render(c.image_url.url)
|
|
6751
6792
|
}
|
|
6752
6793
|
};
|
|
6794
|
+
case "file":
|
|
6795
|
+
return {
|
|
6796
|
+
...c,
|
|
6797
|
+
file: {
|
|
6798
|
+
file_data: render(c.file.file_data || ""),
|
|
6799
|
+
...c.file.file_id && {
|
|
6800
|
+
file_id: render(c.file.file_id)
|
|
6801
|
+
},
|
|
6802
|
+
...c.file.filename && {
|
|
6803
|
+
filename: render(c.file.filename)
|
|
6804
|
+
}
|
|
6805
|
+
}
|
|
6806
|
+
};
|
|
6753
6807
|
default:
|
|
6754
6808
|
const _exhaustiveCheck = c;
|
|
6755
6809
|
return _exhaustiveCheck;
|
|
@@ -8508,6 +8562,7 @@ Error: ${errorText}`;
|
|
|
8508
8562
|
},
|
|
8509
8563
|
use_columnstore: false,
|
|
8510
8564
|
brainstore_realtime: true,
|
|
8565
|
+
query_source: `js_sdk_object_fetcher_${this.objectType}`,
|
|
8511
8566
|
...this.pinnedVersion !== void 0 ? {
|
|
8512
8567
|
version: this.pinnedVersion
|
|
8513
8568
|
} : {}
|