@aegisai/opik
Version:
Opik TypeScript and JavaScript SDK
41 lines (35 loc) • 1.33 kB
text/typescript
import { S as Span, T as Trace, a as SpanType, O as OpikClient } from './Client-C3O8H4SX.cjs';
export { D as DatasetPublic, b as OpikConfig } from './Client-C3O8H4SX.cjs';
import { Logger } from 'tslog';
import 'stream';
type TrackContext = {
span?: Span;
trace?: Trace;
} | {
span: Span;
trace: Trace;
};
declare const getTrackContext: () => Required<TrackContext> | undefined;
type TrackOptions = {
name?: string;
projectName?: string;
type?: SpanType;
};
type OriginalFunction = (...args: any[]) => any;
declare function track(optionsOrOriginalFunction: TrackOptions | OriginalFunction, originalFunction?: OriginalFunction): OriginalFunction;
declare const trackOpikClient: OpikClient;
declare const generateId: () => string;
declare const flushAll: () => Promise<void>;
declare const logLevels: {
readonly SILLY: 0;
readonly TRACE: 1;
readonly DEBUG: 2;
readonly INFO: 3;
readonly WARN: 4;
readonly ERROR: 5;
readonly FATAL: 6;
};
declare const logger: Logger<unknown>;
declare const setLoggerLevel: (level: keyof typeof logLevels) => void;
declare const disableLogger: () => void;
export { OpikClient as Opik, SpanType as OpikSpanType, Span, SpanType, Trace, disableLogger, flushAll, generateId, getTrackContext, logger, setLoggerLevel, track, trackOpikClient };