Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -4208,7 +4208,7 @@
"type": "null"
}
],
"description": "For prompt-backed scorers: the preprocessor function to use for trace template variables. Set to null to disable preprocessing. If omitted, the traced project's default preprocessor will be used, falling back to the global 'thread' preprocessor."
"description": "For prompt-backed functions: the preprocessor function to use for trace template variables. Set to null to disable preprocessing. If omitted, the traced project's default preprocessor will be used, falling back to the global 'thread' preprocessor."
},
"Project": {
"type": "object",
Expand Down Expand Up @@ -6057,6 +6057,17 @@
"required": ["data"],
"description": "Dataset rows",
"title": "dataset_rows"
},
{
"type": "object",
"properties": {
"experiment_name": {
"type": "string"
}
},
"required": ["experiment_name"],
"description": "Experiment whose inputs and outputs should be used as dataset inputs and expected values",
"title": "experiment_name"
}
],
"description": "The dataset to use"
Expand Down Expand Up @@ -6525,7 +6536,7 @@
"type": "null"
}
],
"description": "Execution scope for topic automation. Defaults to span-level execution."
"description": "Execution scope for topic automation."
},
"data_scope": {
"$ref": "#/components/schemas/TopicAutomationDataScope"
Expand Down Expand Up @@ -6695,7 +6706,17 @@
},
"source_facet": {
"type": "string",
"description": "The facet field name to use as input for classification"
"description": "Materialized facet field name used when source_facet_function is absent"
},
"source_facet_function": {
"allOf": [
{
"$ref": "#/components/schemas/SavedFunctionId"
},
{
"description": "The stable function reference for the source facet"
}
]
},
"embedding_model": {
"type": "string",
Expand Down
60 changes: 36 additions & 24 deletions js/src/generated_plain_types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated file (content hash 776b6c295e852681) -- do not modify
// Auto-generated file (content hash e392acbca346c32a) -- do not modify

export type AclObjectTypeType =
/**
Expand Down Expand Up @@ -773,6 +773,26 @@ export type FacetPreprocessorIdType =
code: string;
}
| null;
export type SavedFunctionIdType =
| {
/**
* @enum function
*/
type: "function";
id: string;
version?: /**
* The version of the function
*/
string | undefined;
}
| {
/**
* @enum global
*/
type: "global";
name: string;
function_type: FunctionTypeEnumType;
};
export type TopicMapGenerationSettingsType = {
/**
* @enum hdbscan, kmeans, community
Expand All @@ -795,9 +815,15 @@ export type TopicMapDataType = {
*/
type: "topic_map";
/**
* The facet field name to use as input for classification
* Materialized facet field name used when source_facet_function is absent
*/
source_facet: string;
source_facet_function?:
| (SavedFunctionIdType &
/**
* The stable function reference for the source facet
*/ unknown)
| undefined;
/**
* The embedding model to use for embedding facet values
*/
Expand Down Expand Up @@ -1517,26 +1543,6 @@ export type ObjectReferenceNullishType =
* Indicates the event was copied from another object.
*/
| null;
export type SavedFunctionIdType =
| {
/**
* @enum function
*/
type: "function";
id: string;
version?: /**
* The version of the function
*/
string | undefined;
}
| {
/**
* @enum global
*/
type: "global";
name: string;
function_type: FunctionTypeEnumType;
};
export type DatasetEventType = {
/**
* A unique identifier for the dataset event. If you don't provide one, Braintrust will generate one for you
Expand Down Expand Up @@ -2748,7 +2754,7 @@ export type PromptParserNullishType = {
} | null;
export type PreprocessorSavedFunctionIdType =
/**
* For prompt-backed scorers: the preprocessor function to use for trace template variables. Set to null to disable preprocessing. If omitted, the traced project's default preprocessor will be used, falling back to the global 'thread' preprocessor.
* For prompt-backed functions: the preprocessor function to use for trace template variables. Set to null to disable preprocessing. If omitted, the traced project's default preprocessor will be used, falling back to the global 'thread' preprocessor.
*/
| {
/**
Expand Down Expand Up @@ -4946,7 +4952,7 @@ export type TopicAutomationConfigType = {
topic_map_functions: Array<TopicMapFunctionAutomationType>;
scope?:
| /**
* Execution scope for topic automation. Defaults to span-level execution.
* Execution scope for topic automation.
*/
(SpanScopeType | TraceScopeType | GroupScopeType | null)
| undefined;
Expand Down Expand Up @@ -6393,6 +6399,12 @@ export type RunEvalType = {
*/
| {
data: Array<unknown>;
}
/**
* Experiment whose inputs and outputs should be used as dataset inputs and expected values
*/
| {
experiment_name: string;
};
name?: /**
* The name of the eval to run when multiple evals available
Expand Down
30 changes: 16 additions & 14 deletions js/src/generated_types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated file (content hash 776b6c295e852681) -- do not modify
// Auto-generated file (content hash e392acbca346c32a) -- do not modify

import { z } from "zod/v3";

Expand Down Expand Up @@ -273,6 +273,19 @@ export const FacetPreprocessorId = z.union([
z.null(),
]);
export type FacetPreprocessorIdType = z.infer<typeof FacetPreprocessorId>;
export const SavedFunctionId = z.union([
z.object({
type: z.literal("function"),
id: z.string(),
version: z.string().optional(),
}),
z.object({
type: z.literal("global"),
name: z.string(),
function_type: FunctionTypeEnum.optional().default("scorer"),
}),
]);
export type SavedFunctionIdType = z.infer<typeof SavedFunctionId>;
export const TopicMapGenerationSettings = z.object({
algorithm: z.enum(["hdbscan", "kmeans", "community"]),
dimension_reduction: z.enum(["umap", "pca", "none"]),
Expand All @@ -289,6 +302,7 @@ export type TopicMapGenerationSettingsType = z.infer<
export const TopicMapData = z.object({
type: z.literal("topic_map"),
source_facet: z.string(),
source_facet_function: SavedFunctionId.and(z.unknown()).optional(),
embedding_model: z.string(),
bundle_key: z.string().optional(),
report_key: z.string().optional(),
Expand Down Expand Up @@ -629,19 +643,6 @@ export const ObjectReferenceNullish = z.union([
z.null(),
]);
export type ObjectReferenceNullishType = z.infer<typeof ObjectReferenceNullish>;
export const SavedFunctionId = z.union([
z.object({
type: z.literal("function"),
id: z.string(),
version: z.string().optional(),
}),
z.object({
type: z.literal("global"),
name: z.string(),
function_type: FunctionTypeEnum.optional().default("scorer"),
}),
]);
export type SavedFunctionIdType = z.infer<typeof SavedFunctionId>;
export const DatasetEvent = z.object({
id: z.string(),
_xact_id: z.string(),
Expand Down Expand Up @@ -2170,6 +2171,7 @@ export const RunEval = z.object({
.optional(),
}),
z.object({ data: z.array(z.unknown()) }),
z.object({ experiment_name: z.string() }),
]),
name: z.string().optional(),
parameters: z.object({}).partial().passthrough().optional(),
Expand Down
60 changes: 36 additions & 24 deletions js/util/generated_plain_types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated file (content hash 776b6c295e852681) -- do not modify
// Auto-generated file (content hash e392acbca346c32a) -- do not modify

export type AclObjectTypeType =
/**
Expand Down Expand Up @@ -773,6 +773,26 @@ export type FacetPreprocessorIdType =
code: string;
}
| null;
export type SavedFunctionIdType =
| {
/**
* @enum function
*/
type: "function";
id: string;
version?: /**
* The version of the function
*/
string | undefined;
}
| {
/**
* @enum global
*/
type: "global";
name: string;
function_type: FunctionTypeEnumType;
};
export type TopicMapGenerationSettingsType = {
/**
* @enum hdbscan, kmeans, community
Expand All @@ -795,9 +815,15 @@ export type TopicMapDataType = {
*/
type: "topic_map";
/**
* The facet field name to use as input for classification
* Materialized facet field name used when source_facet_function is absent
*/
source_facet: string;
source_facet_function?:
| (SavedFunctionIdType &
/**
* The stable function reference for the source facet
*/ unknown)
| undefined;
/**
* The embedding model to use for embedding facet values
*/
Expand Down Expand Up @@ -1517,26 +1543,6 @@ export type ObjectReferenceNullishType =
* Indicates the event was copied from another object.
*/
| null;
export type SavedFunctionIdType =
| {
/**
* @enum function
*/
type: "function";
id: string;
version?: /**
* The version of the function
*/
string | undefined;
}
| {
/**
* @enum global
*/
type: "global";
name: string;
function_type: FunctionTypeEnumType;
};
export type DatasetEventType = {
/**
* A unique identifier for the dataset event. If you don't provide one, Braintrust will generate one for you
Expand Down Expand Up @@ -2748,7 +2754,7 @@ export type PromptParserNullishType = {
} | null;
export type PreprocessorSavedFunctionIdType =
/**
* For prompt-backed scorers: the preprocessor function to use for trace template variables. Set to null to disable preprocessing. If omitted, the traced project's default preprocessor will be used, falling back to the global 'thread' preprocessor.
* For prompt-backed functions: the preprocessor function to use for trace template variables. Set to null to disable preprocessing. If omitted, the traced project's default preprocessor will be used, falling back to the global 'thread' preprocessor.
*/
| {
/**
Expand Down Expand Up @@ -4946,7 +4952,7 @@ export type TopicAutomationConfigType = {
topic_map_functions: Array<TopicMapFunctionAutomationType>;
scope?:
| /**
* Execution scope for topic automation. Defaults to span-level execution.
* Execution scope for topic automation.
*/
(SpanScopeType | TraceScopeType | GroupScopeType | null)
| undefined;
Expand Down Expand Up @@ -6393,6 +6399,12 @@ export type RunEvalType = {
*/
| {
data: Array<unknown>;
}
/**
* Experiment whose inputs and outputs should be used as dataset inputs and expected values
*/
| {
experiment_name: string;
};
name?: /**
* The name of the eval to run when multiple evals available
Expand Down
30 changes: 16 additions & 14 deletions js/util/generated_types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated file (content hash 776b6c295e852681) -- do not modify
// Auto-generated file (content hash e392acbca346c32a) -- do not modify

import { z } from "zod/v3";

Expand Down Expand Up @@ -273,6 +273,19 @@ export const FacetPreprocessorId = z.union([
z.null(),
]);
export type FacetPreprocessorIdType = z.infer<typeof FacetPreprocessorId>;
export const SavedFunctionId = z.union([
z.object({
type: z.literal("function"),
id: z.string(),
version: z.string().optional(),
}),
z.object({
type: z.literal("global"),
name: z.string(),
function_type: FunctionTypeEnum.optional().default("scorer"),
}),
]);
export type SavedFunctionIdType = z.infer<typeof SavedFunctionId>;
export const TopicMapGenerationSettings = z.object({
algorithm: z.enum(["hdbscan", "kmeans", "community"]),
dimension_reduction: z.enum(["umap", "pca", "none"]),
Expand All @@ -289,6 +302,7 @@ export type TopicMapGenerationSettingsType = z.infer<
export const TopicMapData = z.object({
type: z.literal("topic_map"),
source_facet: z.string(),
source_facet_function: SavedFunctionId.and(z.unknown()).optional(),
embedding_model: z.string(),
bundle_key: z.string().optional(),
report_key: z.string().optional(),
Expand Down Expand Up @@ -629,19 +643,6 @@ export const ObjectReferenceNullish = z.union([
z.null(),
]);
export type ObjectReferenceNullishType = z.infer<typeof ObjectReferenceNullish>;
export const SavedFunctionId = z.union([
z.object({
type: z.literal("function"),
id: z.string(),
version: z.string().optional(),
}),
z.object({
type: z.literal("global"),
name: z.string(),
function_type: FunctionTypeEnum.optional().default("scorer"),
}),
]);
export type SavedFunctionIdType = z.infer<typeof SavedFunctionId>;
export const DatasetEvent = z.object({
id: z.string(),
_xact_id: z.string(),
Expand Down Expand Up @@ -2170,6 +2171,7 @@ export const RunEval = z.object({
.optional(),
}),
z.object({ data: z.array(z.unknown()) }),
z.object({ experiment_name: z.string() }),
]),
name: z.string().optional(),
parameters: z.object({}).partial().passthrough().optional(),
Expand Down
Loading