File size: 1,485 Bytes
064bfd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | /**
* Beta tracing is disabled in the OSS build.
*/
export interface Span {
setAttribute(name: string, value: string | number | boolean): void
setAttributes(attributes: Record<string, string | number | boolean>): void
addEvent(
name: string,
attributes?: Record<string, string | number | boolean>,
): void
end(): void
recordException(error: unknown): void
}
export interface LLMRequestNewContext {
systemPrompt?: string
querySource?: string
tools?: string
}
export function clearBetaTracingState(): void {}
export function isBetaTracingEnabled(): boolean {
return false
}
export function truncateContent(
content: string,
_maxSize?: number,
): { content: string; truncated: boolean } {
return { content, truncated: false }
}
export function addBetaInteractionAttributes(
_span: Span,
_userPrompt: string,
): void {}
export function addBetaLLMRequestAttributes(
_span: Span,
_newContext?: LLMRequestNewContext,
_messagesForAPI?: unknown[],
): void {}
export function addBetaLLMResponseAttributes(
_endAttributes: Record<string, string | number | boolean>,
_metadata?: {
modelOutput?: string
thinkingOutput?: string
},
): void {}
export function addBetaToolInputAttributes(
_span: Span,
_toolName: string,
_toolInput: string,
) {}
export function addBetaToolResultAttributes(
_endAttributes: Record<string, string | number | boolean>,
_toolName: string | number | boolean,
_toolResult: string,
): void {}
|