UNPKG

openlit

Version:

OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications, facilitating the integration of observability into your GenAI-driven projects

47 lines (46 loc) 2.41 kB
import { resourceFromAttributes } from '@opentelemetry/resources'; import { NodeSDK } from '@opentelemetry/sdk-node'; import { OpenlitOptions } from './types'; import BaseOpenlit from './features/base'; import { Hallucination, Bias, Toxicity, All } from './evals'; import { PromptInjection } from './guard/prompt-injection'; import { SensitiveTopic } from './guard/sensitive-topic'; import { TopicRestriction } from './guard/topic-restriction'; import { All as GuardAll } from './guard/all'; declare const evals: { Hallucination: (options: ConstructorParameters<typeof Hallucination>[0]) => Hallucination; Bias: (options: ConstructorParameters<typeof Bias>[0]) => Bias; Toxicity: (options: ConstructorParameters<typeof Toxicity>[0]) => Toxicity; All: (options: ConstructorParameters<typeof All>[0]) => All; }; declare const guard: { PromptInjection: (options: ConstructorParameters<typeof PromptInjection>[0]) => PromptInjection; SensitiveTopic: (options: ConstructorParameters<typeof SensitiveTopic>[0]) => SensitiveTopic; TopicRestriction: (options: ConstructorParameters<typeof TopicRestriction>[0]) => TopicRestriction; All: (options: ConstructorParameters<typeof GuardAll>[0]) => GuardAll; }; declare class Openlit extends BaseOpenlit { static resource: ReturnType<typeof resourceFromAttributes>; static options: OpenlitOptions; static _sdk: NodeSDK; static evals: { Hallucination: (options: ConstructorParameters<typeof Hallucination>[0]) => Hallucination; Bias: (options: ConstructorParameters<typeof Bias>[0]) => Bias; Toxicity: (options: ConstructorParameters<typeof Toxicity>[0]) => Toxicity; All: (options: ConstructorParameters<typeof All>[0]) => All; }; static guard: { PromptInjection: (options: ConstructorParameters<typeof PromptInjection>[0]) => PromptInjection; SensitiveTopic: (options: ConstructorParameters<typeof SensitiveTopic>[0]) => SensitiveTopic; TopicRestriction: (options: ConstructorParameters<typeof TopicRestriction>[0]) => TopicRestriction; All: (options: ConstructorParameters<typeof GuardAll>[0]) => GuardAll; }; static init(options?: OpenlitOptions): void; } declare const openlit: typeof Openlit & { evals: typeof evals; guard: typeof guard; }; export default openlit; export { Openlit }; export type { OpenlitOptions } from './types';