UNPKG

@prism-lang/core

Version:

A programming language for uncertainty

39 lines 1.32 kB
/** * LLM type definitions for @prism-lang/core * These are duplicated here to avoid hard dependency on @prism-lang/llm */ export interface LLMOptions { maxTokens?: number; temperature?: number; topP?: number; timeout?: number; model?: string; structuredOutput?: boolean; includeReasoning?: boolean; } export declare class LLMRequest { readonly prompt: string; readonly options: LLMOptions; constructor(prompt: string, options?: LLMOptions); } export declare class LLMResponse { readonly content: string; readonly confidence: number; readonly tokensUsed: number; readonly model: string; readonly metadata?: Record<string, unknown> | undefined; constructor(content: string, confidence: number, tokensUsed?: number, model?: string, metadata?: Record<string, unknown> | undefined); } export interface LLMProvider { readonly name: string; complete(request: LLMRequest): Promise<LLMResponse>; embed?(text: string): Promise<number[]>; } export declare class MockLLMProvider implements LLMProvider { readonly name = "Mock"; private mockResponse; private mockConfidence; complete(_request: LLMRequest): Promise<LLMResponse>; setMockResponse(response: string, confidence: number): void; } //# sourceMappingURL=llm-types.d.ts.map