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.
39 lines • 1.28 kB
TypeScript
import { ModelDefinition, ModelAdapter, ApiClientConfig } from '../types';
/**
* Anthropic-specific configuration options
*/
export interface AnthropicConfig extends ApiClientConfig {
/** Anthropic-specific API version */
apiVersion?: string;
}
/**
* Adapter for Anthropic models
*/
export declare class AnthropicModelAdapter implements ModelAdapter {
private client;
private modelDef;
/**
* Create a new Anthropic adapter
*
* @param modelDef - The model definition
*/
constructor(modelDef: ModelDefinition);
/**
* Send a completion request to Anthropic
* Note: This uses the messages API since Anthropic's newer models all use chat
*
* @param prompt - The prompt text
* @param options - Additional options for the request
* @returns The completion text
*/
complete(prompt: string, options?: Record<string, any>): Promise<string>;
/**
* Generate chat completions using Anthropic
*
* @param messages - Array of message objects (role and content)
* @param options - Additional options for the request
* @returns The chat completion response
*/
chat(messages: any[], options?: Record<string, any>): Promise<any>;
}
//# sourceMappingURL=anthropic.d.ts.map