UNPKG

selvedge

Version:

A type-safe, declarative DSL for building robust, composable LLM prompts and programs in TypeScript. Selvedge simplifies prompt engineering, structured output, and multi-model orchestration.

46 lines 1.53 kB
/** * Model registry and adapters for different LLM providers */ import { ModelDefinition, SelvedgeInstance, ModelAdapter } from './types'; /** * Registry for model definitions and adapters */ export declare class ModelRegistry { /** * Register multiple models with aliases * * @param modelMap - Object mapping aliases to model definitions * @param selvedge - The selvedge instance to return * @returns The selvedge instance for chaining */ static registerModels(modelMap: Record<string, ModelDefinition>, selvedge: SelvedgeInstance): SelvedgeInstance; /** * Get a model definition by its alias * * @param alias - The model alias * @returns The model definition, or undefined if not found */ static getModel(alias: string): ModelDefinition | undefined; /** * List all registered models with their aliases and definitions * * @returns An array of objects containing model aliases and their definitions */ static listModels(): Array<{ alias: string; definition: ModelDefinition; }>; /** * Get or create a model adapter for a given model definition * * @param modelDef - The model definition * @returns The adapter for the model */ static getAdapter(modelDef: ModelDefinition): ModelAdapter | undefined; /** * Clear all registered models and adapters * Primarily used for testing purposes */ static clear(): void; } //# sourceMappingURL=models.d.ts.map