@unified-llm/core
Version:
Unified LLM interface.
19 lines (18 loc) • 693 B
TypeScript
import { UnifiedChatRequest, UnifiedChatResponse, Tool } from '../../types/unified-api';
import BaseProvider from '../base-provider';
export declare class AnthropicProvider extends BaseProvider {
private client;
constructor({ apiKey, model, tools }: {
apiKey: string;
model?: string;
tools?: Tool[];
});
chat(request: UnifiedChatRequest): Promise<UnifiedChatResponse>;
stream(request: UnifiedChatRequest): AsyncIterableIterator<UnifiedChatResponse>;
private convertToAnthropicFormat;
private convertFromAnthropicFormat;
private convertStreamChunk;
private extractTextFromContent;
private handleError;
private mapErrorType;
}