braintrust 0.3.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/dist/index.d.mts +25 -0
- package/dev/dist/index.d.ts +25 -0
- package/dev/dist/index.js +454 -122
- package/dev/dist/index.mjs +1360 -1028
- package/dist/browser.d.mts +31 -2
- package/dist/browser.d.ts +31 -2
- package/dist/browser.js +309 -114
- package/dist/browser.mjs +1183 -988
- package/dist/cli.js +1361 -1023
- package/dist/index.d.mts +131 -2
- package/dist/index.d.ts +131 -2
- package/dist/index.js +814 -177
- package/dist/index.mjs +1681 -1044
- package/package.json +6 -4
- package/util/dist/index.d.mts +65 -2
- package/util/dist/index.d.ts +65 -2
- package/util/dist/index.js +229 -17
- package/util/dist/index.mjs +230 -18
package/dist/browser.d.mts
CHANGED
|
@@ -14,6 +14,24 @@ declare class LazyValue<T> {
|
|
|
14
14
|
get hasSucceeded(): boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Abstract base class for ID generators
|
|
19
|
+
*/
|
|
20
|
+
declare abstract class IDGenerator {
|
|
21
|
+
/**
|
|
22
|
+
* Generate a span ID
|
|
23
|
+
*/
|
|
24
|
+
abstract getSpanId(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Generate a trace ID
|
|
27
|
+
*/
|
|
28
|
+
abstract getTraceId(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Return true if the generator should use span_id as root_span_id for backwards compatibility
|
|
31
|
+
*/
|
|
32
|
+
abstract shareRootSpanId(): boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
declare const TRANSACTION_ID_FIELD = "_xact_id";
|
|
18
36
|
declare const IS_MERGE_FIELD = "_is_merge";
|
|
19
37
|
declare const MERGE_PATHS_FIELD = "_merge_paths";
|
|
@@ -8031,6 +8049,7 @@ declare class NoopSpan implements Span {
|
|
|
8031
8049
|
setAttributes(_args: Omit<StartSpanArgs, "event">): void;
|
|
8032
8050
|
startSpanWithParents(_spanId: string, _spanParents: string[], _args?: StartSpanArgs): Span;
|
|
8033
8051
|
state(): BraintrustState;
|
|
8052
|
+
toString(): string;
|
|
8034
8053
|
}
|
|
8035
8054
|
declare const NOOP_SPAN: NoopSpan;
|
|
8036
8055
|
declare const NOOP_SPAN_PERMALINK = "https://braintrust.dev/noop-span";
|
|
@@ -8104,8 +8123,11 @@ declare class BraintrustState {
|
|
|
8104
8123
|
private _apiConn;
|
|
8105
8124
|
private _proxyConn;
|
|
8106
8125
|
promptCache: PromptCache;
|
|
8126
|
+
private _idGenerator;
|
|
8107
8127
|
constructor(loginParams: LoginOptions);
|
|
8108
8128
|
resetLoginInfo(): void;
|
|
8129
|
+
resetIdGenState(): void;
|
|
8130
|
+
get idGenerator(): IDGenerator;
|
|
8109
8131
|
copyLoginInfo(other: BraintrustState): void;
|
|
8110
8132
|
serialize(): SerializedBraintrustState;
|
|
8111
8133
|
static deserialize(serialized: unknown, opts?: LoginOptions): BraintrustState;
|
|
@@ -8123,6 +8145,8 @@ declare class BraintrustState {
|
|
|
8123
8145
|
loginReplaceApiConn(apiConn: HTTPConnection): void;
|
|
8124
8146
|
disable(): void;
|
|
8125
8147
|
enforceQueueSizeLimit(enforce: boolean): void;
|
|
8148
|
+
toJSON(): Record<string, any>;
|
|
8149
|
+
toString(): string;
|
|
8126
8150
|
}
|
|
8127
8151
|
declare function useTestBackgroundLogger(): TestBackgroundLogger;
|
|
8128
8152
|
declare function clearTestBackgroundLogger(): void;
|
|
@@ -8159,6 +8183,7 @@ declare class HTTPConnection {
|
|
|
8159
8183
|
post(path: string, params?: Record<string, unknown> | string, config?: RequestInit): Promise<Response>;
|
|
8160
8184
|
get_json(object_type: string, args?: Record<string, string | string[] | undefined> | undefined, retries?: number): Promise<any>;
|
|
8161
8185
|
post_json(object_type: string, args?: Record<string, unknown> | string | undefined): Promise<any>;
|
|
8186
|
+
toString(): string;
|
|
8162
8187
|
}
|
|
8163
8188
|
interface ObjectMetadata {
|
|
8164
8189
|
id: string;
|
|
@@ -9142,6 +9167,7 @@ declare class SpanImpl implements Span {
|
|
|
9142
9167
|
flush(): Promise<void>;
|
|
9143
9168
|
close(args?: EndSpanArgs): number;
|
|
9144
9169
|
state(): BraintrustState;
|
|
9170
|
+
toString(): string;
|
|
9145
9171
|
}
|
|
9146
9172
|
/**
|
|
9147
9173
|
* A dataset is a collection of records, such as model inputs and expected outputs, which represent
|
|
@@ -9413,6 +9439,7 @@ declare function simulateLogoutForTests(): BraintrustState;
|
|
|
9413
9439
|
* @returns Promise containing the version data
|
|
9414
9440
|
*/
|
|
9415
9441
|
declare function getPromptVersions(projectId: string, promptId: string): Promise<any>;
|
|
9442
|
+
declare function resetIdGenStateForTests(): void;
|
|
9416
9443
|
declare const _exportsForTestingOnly: {
|
|
9417
9444
|
extractAttachments: typeof extractAttachments;
|
|
9418
9445
|
deepCopyEvent: typeof deepCopyEvent;
|
|
@@ -9424,6 +9451,7 @@ declare const _exportsForTestingOnly: {
|
|
|
9424
9451
|
initTestExperiment: typeof initTestExperiment;
|
|
9425
9452
|
isGeneratorFunction: typeof isGeneratorFunction;
|
|
9426
9453
|
isAsyncGeneratorFunction: typeof isAsyncGeneratorFunction;
|
|
9454
|
+
resetIdGenStateForTests: typeof resetIdGenStateForTests;
|
|
9427
9455
|
};
|
|
9428
9456
|
|
|
9429
9457
|
declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
@@ -19958,6 +19986,7 @@ declare const braintrust_createFinalValuePassThroughStream: typeof createFinalVa
|
|
|
19958
19986
|
declare const braintrust_currentExperiment: typeof currentExperiment;
|
|
19959
19987
|
declare const braintrust_currentLogger: typeof currentLogger;
|
|
19960
19988
|
declare const braintrust_currentSpan: typeof currentSpan;
|
|
19989
|
+
declare const braintrust_deepCopyEvent: typeof deepCopyEvent;
|
|
19961
19990
|
declare const braintrust_deserializePlainStringAsJSON: typeof deserializePlainStringAsJSON;
|
|
19962
19991
|
declare const braintrust_devNullWritableStream: typeof devNullWritableStream;
|
|
19963
19992
|
declare const braintrust_evaluatorDefinitionSchema: typeof evaluatorDefinitionSchema;
|
|
@@ -19998,7 +20027,7 @@ declare const braintrust_wrapOpenAI: typeof wrapOpenAI;
|
|
|
19998
20027
|
declare const braintrust_wrapOpenAIv4: typeof wrapOpenAIv4;
|
|
19999
20028
|
declare const braintrust_wrapTraced: typeof wrapTraced;
|
|
20000
20029
|
declare namespace braintrust {
|
|
20001
|
-
export { type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, type braintrust_CommentEvent as CommentEvent, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetRecord as DatasetRecord, 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, type braintrust_EvalCase as EvalCase, type braintrust_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type braintrust_EvalParameters as EvalParameters, type braintrust_EvaluatorDefinition as EvaluatorDefinition, type braintrust_EvaluatorDefinitions as EvaluatorDefinitions, type braintrust_EvaluatorManifest as EvaluatorManifest, braintrust_Experiment as Experiment, type braintrust_ExperimentLogFullArgs as ExperimentLogFullArgs, type braintrust_ExperimentLogPartialArgs as ExperimentLogPartialArgs, 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, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_IdField as IdField, type braintrust_InitOptions as InitOptions, type braintrust_InputField as InputField, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogCommentFullArgs as LogCommentFullArgs, type braintrust_LogFeedbackFullArgs as LogFeedbackFullArgs, 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, type braintrust_OtherExperimentLogFields as OtherExperimentLogFields, type braintrust_ParentExperimentIds as ParentExperimentIds, type braintrust_ParentProjectLogIds as ParentProjectLogIds, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, type braintrust_ScoreSummary as ScoreSummary, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type braintrust_Span as Span, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, 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_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_evaluatorDefinitionSchema as evaluatorDefinitionSchema, braintrust_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, braintrust_flush as flush, braintrust_getPromptVersions as getPromptVersions, braintrust_getSpanParentObject as getSpanParentObject, 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_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_setFetch as setFetch, braintrust_setMaskingFunction as setMaskingFunction, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, 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_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
|
|
20030
|
+
export { type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, type braintrust_CommentEvent as CommentEvent, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetRecord as DatasetRecord, 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, type braintrust_EvalCase as EvalCase, type braintrust_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type braintrust_EvalParameters as EvalParameters, type braintrust_EvaluatorDefinition as EvaluatorDefinition, type braintrust_EvaluatorDefinitions as EvaluatorDefinitions, type braintrust_EvaluatorManifest as EvaluatorManifest, braintrust_Experiment as Experiment, type braintrust_ExperimentLogFullArgs as ExperimentLogFullArgs, type braintrust_ExperimentLogPartialArgs as ExperimentLogPartialArgs, 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, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_IdField as IdField, type braintrust_InitOptions as InitOptions, type braintrust_InputField as InputField, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogCommentFullArgs as LogCommentFullArgs, type braintrust_LogFeedbackFullArgs as LogFeedbackFullArgs, 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, type braintrust_OtherExperimentLogFields as OtherExperimentLogFields, type braintrust_ParentExperimentIds as ParentExperimentIds, type braintrust_ParentProjectLogIds as ParentProjectLogIds, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, type braintrust_ScoreSummary as ScoreSummary, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type braintrust_Span as Span, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, 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_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_deepCopyEvent as deepCopyEvent, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_evaluatorDefinitionSchema as evaluatorDefinitionSchema, braintrust_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, braintrust_flush as flush, braintrust_getPromptVersions as getPromptVersions, braintrust_getSpanParentObject as getSpanParentObject, 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_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_setFetch as setFetch, braintrust_setMaskingFunction as setMaskingFunction, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, 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_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
|
|
20002
20031
|
}
|
|
20003
20032
|
|
|
20004
|
-
export { type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, type BaseMetadata, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, type EvalCase, type EvalParameterSerializedSchema, type EvalParameters, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, INTERNAL_BTQL_LIMIT, type IdField, type InitOptions, type InputField, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, type OtherExperimentLogFields, type ParentExperimentIds, type ParentProjectLogIds, type PromiseUnless, Prompt, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type ScoreSummary, type SerializedBraintrustState, type SetCurrentArg, type Span, SpanImpl, type StartSpanArgs, TestBackgroundLogger, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, braintrust as default, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getPromptVersions, getSpanParentObject, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, renderMessage, renderPromptParams, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapOpenAI, wrapOpenAIv4, wrapTraced };
|
|
20033
|
+
export { type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, type BaseMetadata, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, type EvalCase, type EvalParameterSerializedSchema, type EvalParameters, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, INTERNAL_BTQL_LIMIT, type IdField, type InitOptions, type InputField, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, type OtherExperimentLogFields, type ParentExperimentIds, type ParentProjectLogIds, type PromiseUnless, Prompt, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type ScoreSummary, type SerializedBraintrustState, type SetCurrentArg, type Span, SpanImpl, type StartSpanArgs, TestBackgroundLogger, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, braintrust as default, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getPromptVersions, getSpanParentObject, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, renderMessage, renderPromptParams, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapOpenAI, wrapOpenAIv4, wrapTraced };
|
package/dist/browser.d.ts
CHANGED
|
@@ -14,6 +14,24 @@ declare class LazyValue<T> {
|
|
|
14
14
|
get hasSucceeded(): boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Abstract base class for ID generators
|
|
19
|
+
*/
|
|
20
|
+
declare abstract class IDGenerator {
|
|
21
|
+
/**
|
|
22
|
+
* Generate a span ID
|
|
23
|
+
*/
|
|
24
|
+
abstract getSpanId(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Generate a trace ID
|
|
27
|
+
*/
|
|
28
|
+
abstract getTraceId(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Return true if the generator should use span_id as root_span_id for backwards compatibility
|
|
31
|
+
*/
|
|
32
|
+
abstract shareRootSpanId(): boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
declare const TRANSACTION_ID_FIELD = "_xact_id";
|
|
18
36
|
declare const IS_MERGE_FIELD = "_is_merge";
|
|
19
37
|
declare const MERGE_PATHS_FIELD = "_merge_paths";
|
|
@@ -8031,6 +8049,7 @@ declare class NoopSpan implements Span {
|
|
|
8031
8049
|
setAttributes(_args: Omit<StartSpanArgs, "event">): void;
|
|
8032
8050
|
startSpanWithParents(_spanId: string, _spanParents: string[], _args?: StartSpanArgs): Span;
|
|
8033
8051
|
state(): BraintrustState;
|
|
8052
|
+
toString(): string;
|
|
8034
8053
|
}
|
|
8035
8054
|
declare const NOOP_SPAN: NoopSpan;
|
|
8036
8055
|
declare const NOOP_SPAN_PERMALINK = "https://braintrust.dev/noop-span";
|
|
@@ -8104,8 +8123,11 @@ declare class BraintrustState {
|
|
|
8104
8123
|
private _apiConn;
|
|
8105
8124
|
private _proxyConn;
|
|
8106
8125
|
promptCache: PromptCache;
|
|
8126
|
+
private _idGenerator;
|
|
8107
8127
|
constructor(loginParams: LoginOptions);
|
|
8108
8128
|
resetLoginInfo(): void;
|
|
8129
|
+
resetIdGenState(): void;
|
|
8130
|
+
get idGenerator(): IDGenerator;
|
|
8109
8131
|
copyLoginInfo(other: BraintrustState): void;
|
|
8110
8132
|
serialize(): SerializedBraintrustState;
|
|
8111
8133
|
static deserialize(serialized: unknown, opts?: LoginOptions): BraintrustState;
|
|
@@ -8123,6 +8145,8 @@ declare class BraintrustState {
|
|
|
8123
8145
|
loginReplaceApiConn(apiConn: HTTPConnection): void;
|
|
8124
8146
|
disable(): void;
|
|
8125
8147
|
enforceQueueSizeLimit(enforce: boolean): void;
|
|
8148
|
+
toJSON(): Record<string, any>;
|
|
8149
|
+
toString(): string;
|
|
8126
8150
|
}
|
|
8127
8151
|
declare function useTestBackgroundLogger(): TestBackgroundLogger;
|
|
8128
8152
|
declare function clearTestBackgroundLogger(): void;
|
|
@@ -8159,6 +8183,7 @@ declare class HTTPConnection {
|
|
|
8159
8183
|
post(path: string, params?: Record<string, unknown> | string, config?: RequestInit): Promise<Response>;
|
|
8160
8184
|
get_json(object_type: string, args?: Record<string, string | string[] | undefined> | undefined, retries?: number): Promise<any>;
|
|
8161
8185
|
post_json(object_type: string, args?: Record<string, unknown> | string | undefined): Promise<any>;
|
|
8186
|
+
toString(): string;
|
|
8162
8187
|
}
|
|
8163
8188
|
interface ObjectMetadata {
|
|
8164
8189
|
id: string;
|
|
@@ -9142,6 +9167,7 @@ declare class SpanImpl implements Span {
|
|
|
9142
9167
|
flush(): Promise<void>;
|
|
9143
9168
|
close(args?: EndSpanArgs): number;
|
|
9144
9169
|
state(): BraintrustState;
|
|
9170
|
+
toString(): string;
|
|
9145
9171
|
}
|
|
9146
9172
|
/**
|
|
9147
9173
|
* A dataset is a collection of records, such as model inputs and expected outputs, which represent
|
|
@@ -9413,6 +9439,7 @@ declare function simulateLogoutForTests(): BraintrustState;
|
|
|
9413
9439
|
* @returns Promise containing the version data
|
|
9414
9440
|
*/
|
|
9415
9441
|
declare function getPromptVersions(projectId: string, promptId: string): Promise<any>;
|
|
9442
|
+
declare function resetIdGenStateForTests(): void;
|
|
9416
9443
|
declare const _exportsForTestingOnly: {
|
|
9417
9444
|
extractAttachments: typeof extractAttachments;
|
|
9418
9445
|
deepCopyEvent: typeof deepCopyEvent;
|
|
@@ -9424,6 +9451,7 @@ declare const _exportsForTestingOnly: {
|
|
|
9424
9451
|
initTestExperiment: typeof initTestExperiment;
|
|
9425
9452
|
isGeneratorFunction: typeof isGeneratorFunction;
|
|
9426
9453
|
isAsyncGeneratorFunction: typeof isAsyncGeneratorFunction;
|
|
9454
|
+
resetIdGenStateForTests: typeof resetIdGenStateForTests;
|
|
9427
9455
|
};
|
|
9428
9456
|
|
|
9429
9457
|
declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
|
|
@@ -19958,6 +19986,7 @@ declare const braintrust_createFinalValuePassThroughStream: typeof createFinalVa
|
|
|
19958
19986
|
declare const braintrust_currentExperiment: typeof currentExperiment;
|
|
19959
19987
|
declare const braintrust_currentLogger: typeof currentLogger;
|
|
19960
19988
|
declare const braintrust_currentSpan: typeof currentSpan;
|
|
19989
|
+
declare const braintrust_deepCopyEvent: typeof deepCopyEvent;
|
|
19961
19990
|
declare const braintrust_deserializePlainStringAsJSON: typeof deserializePlainStringAsJSON;
|
|
19962
19991
|
declare const braintrust_devNullWritableStream: typeof devNullWritableStream;
|
|
19963
19992
|
declare const braintrust_evaluatorDefinitionSchema: typeof evaluatorDefinitionSchema;
|
|
@@ -19998,7 +20027,7 @@ declare const braintrust_wrapOpenAI: typeof wrapOpenAI;
|
|
|
19998
20027
|
declare const braintrust_wrapOpenAIv4: typeof wrapOpenAIv4;
|
|
19999
20028
|
declare const braintrust_wrapTraced: typeof wrapTraced;
|
|
20000
20029
|
declare namespace braintrust {
|
|
20001
|
-
export { type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, type braintrust_CommentEvent as CommentEvent, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetRecord as DatasetRecord, 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, type braintrust_EvalCase as EvalCase, type braintrust_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type braintrust_EvalParameters as EvalParameters, type braintrust_EvaluatorDefinition as EvaluatorDefinition, type braintrust_EvaluatorDefinitions as EvaluatorDefinitions, type braintrust_EvaluatorManifest as EvaluatorManifest, braintrust_Experiment as Experiment, type braintrust_ExperimentLogFullArgs as ExperimentLogFullArgs, type braintrust_ExperimentLogPartialArgs as ExperimentLogPartialArgs, 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, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_IdField as IdField, type braintrust_InitOptions as InitOptions, type braintrust_InputField as InputField, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogCommentFullArgs as LogCommentFullArgs, type braintrust_LogFeedbackFullArgs as LogFeedbackFullArgs, 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, type braintrust_OtherExperimentLogFields as OtherExperimentLogFields, type braintrust_ParentExperimentIds as ParentExperimentIds, type braintrust_ParentProjectLogIds as ParentProjectLogIds, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, type braintrust_ScoreSummary as ScoreSummary, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type braintrust_Span as Span, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, 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_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_evaluatorDefinitionSchema as evaluatorDefinitionSchema, braintrust_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, braintrust_flush as flush, braintrust_getPromptVersions as getPromptVersions, braintrust_getSpanParentObject as getSpanParentObject, 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_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_setFetch as setFetch, braintrust_setMaskingFunction as setMaskingFunction, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, 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_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
|
|
20030
|
+
export { type braintrust_AnyDataset as AnyDataset, braintrust_Attachment as Attachment, type braintrust_AttachmentParams as AttachmentParams, type braintrust_BackgroundLoggerOpts as BackgroundLoggerOpts, braintrust_BaseAttachment as BaseAttachment, type braintrust_BaseMetadata as BaseMetadata, braintrust_BraintrustState as BraintrustState, braintrust_BraintrustStream as BraintrustStream, type braintrust_BraintrustStreamChunk as BraintrustStreamChunk, type braintrust_ChatPrompt as ChatPrompt, type braintrust_CommentEvent as CommentEvent, type braintrust_CompiledPrompt as CompiledPrompt, type braintrust_CompiledPromptParams as CompiledPromptParams, type braintrust_CompletionPrompt as CompletionPrompt, type braintrust_DataSummary as DataSummary, braintrust_Dataset as Dataset, type braintrust_DatasetRecord as DatasetRecord, 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, type braintrust_EvalCase as EvalCase, type braintrust_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type braintrust_EvalParameters as EvalParameters, type braintrust_EvaluatorDefinition as EvaluatorDefinition, type braintrust_EvaluatorDefinitions as EvaluatorDefinitions, type braintrust_EvaluatorManifest as EvaluatorManifest, braintrust_Experiment as Experiment, type braintrust_ExperimentLogFullArgs as ExperimentLogFullArgs, type braintrust_ExperimentLogPartialArgs as ExperimentLogPartialArgs, 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, braintrust_INTERNAL_BTQL_LIMIT as INTERNAL_BTQL_LIMIT, type braintrust_IdField as IdField, type braintrust_InitOptions as InitOptions, type braintrust_InputField as InputField, type braintrust_InvokeFunctionArgs as InvokeFunctionArgs, type braintrust_InvokeReturn as InvokeReturn, braintrust_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, braintrust_LazyValue as LazyValue, type braintrust_LogCommentFullArgs as LogCommentFullArgs, type braintrust_LogFeedbackFullArgs as LogFeedbackFullArgs, 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, type braintrust_OtherExperimentLogFields as OtherExperimentLogFields, type braintrust_ParentExperimentIds as ParentExperimentIds, type braintrust_ParentProjectLogIds as ParentProjectLogIds, type braintrust_PromiseUnless as PromiseUnless, braintrust_Prompt as Prompt, type braintrust_PromptRowWithId as PromptRowWithId, braintrust_ReadonlyAttachment as ReadonlyAttachment, braintrust_ReadonlyExperiment as ReadonlyExperiment, type braintrust_ScoreSummary as ScoreSummary, type braintrust_SerializedBraintrustState as SerializedBraintrustState, type braintrust_SetCurrentArg as SetCurrentArg, type braintrust_Span as Span, braintrust_SpanImpl as SpanImpl, type braintrust_StartSpanArgs as StartSpanArgs, braintrust_TestBackgroundLogger as TestBackgroundLogger, 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_createFinalValuePassThroughStream as createFinalValuePassThroughStream, braintrust_currentExperiment as currentExperiment, braintrust_currentLogger as currentLogger, braintrust_currentSpan as currentSpan, braintrust_deepCopyEvent as deepCopyEvent, braintrust_deserializePlainStringAsJSON as deserializePlainStringAsJSON, braintrust_devNullWritableStream as devNullWritableStream, braintrust_evaluatorDefinitionSchema as evaluatorDefinitionSchema, braintrust_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, braintrust_flush as flush, braintrust_getPromptVersions as getPromptVersions, braintrust_getSpanParentObject as getSpanParentObject, 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_renderMessage as renderMessage, braintrust_renderPromptParams as renderPromptParams, braintrust_setFetch as setFetch, braintrust_setMaskingFunction as setMaskingFunction, braintrust_spanComponentsToObjectId as spanComponentsToObjectId, braintrust_startSpan as startSpan, braintrust_summarize as summarize, 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_wrapOpenAI as wrapOpenAI, braintrust_wrapOpenAIv4 as wrapOpenAIv4, braintrust_wrapTraced as wrapTraced };
|
|
20002
20031
|
}
|
|
20003
20032
|
|
|
20004
|
-
export { type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, type BaseMetadata, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, type EvalCase, type EvalParameterSerializedSchema, type EvalParameters, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, INTERNAL_BTQL_LIMIT, type IdField, type InitOptions, type InputField, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, type OtherExperimentLogFields, type ParentExperimentIds, type ParentProjectLogIds, type PromiseUnless, Prompt, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type ScoreSummary, type SerializedBraintrustState, type SetCurrentArg, type Span, SpanImpl, type StartSpanArgs, TestBackgroundLogger, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, braintrust as default, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getPromptVersions, getSpanParentObject, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, renderMessage, renderPromptParams, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapOpenAI, wrapOpenAIv4, wrapTraced };
|
|
20033
|
+
export { type AnyDataset, Attachment, type AttachmentParams, type BackgroundLoggerOpts, BaseAttachment, type BaseMetadata, BraintrustState, BraintrustStream, type BraintrustStreamChunk, type ChatPrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, type EvalCase, type EvalParameterSerializedSchema, type EvalParameters, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitOptions, type FullLoginOptions, INTERNAL_BTQL_LIMIT, type IdField, type InitOptions, type InputField, type InvokeFunctionArgs, type InvokeReturn, LEGACY_CACHED_HEADER, LazyValue, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, type LoginOptions, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, type ObjectMetadata, type OtherExperimentLogFields, type ParentExperimentIds, type ParentProjectLogIds, type PromiseUnless, Prompt, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type ScoreSummary, type SerializedBraintrustState, type SetCurrentArg, type Span, SpanImpl, type StartSpanArgs, TestBackgroundLogger, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, _internalSetInitialState, braintrustStreamChunkSchema, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, braintrust as default, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getPromptVersions, getSpanParentObject, init, initDataset, initExperiment, initFunction, initLogger, invoke, loadPrompt, log, logError, login, loginToState, newId, parseCachedHeader, permalink, renderMessage, renderPromptParams, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, traceable, traced, updateSpan, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapOpenAI, wrapOpenAIv4, wrapTraced };
|