contextual-agent-sdk
Version:
SDK for building AI agents with seamless voice-text context switching
22 lines • 1.32 kB
TypeScript
import { LLMProvider, LLMProviderType, LLMGenerateOptions, LLMResponse, LLMToolOptions, LLMToolResponse, LLMConversation, LLMStreamChunk, ConversationMessage } from '../../types/llm-providers';
import { Tool } from '../../types';
import { ConversationManager } from '../conversation/ConversationManager';
export declare abstract class BaseLLMProvider implements LLMProvider {
abstract readonly type: LLMProviderType;
protected conversationManager: ConversationManager;
constructor();
abstract getMaxTokens(): number;
abstract generateResponse(options: LLMGenerateOptions): Promise<LLMResponse>;
supportsTools(): boolean;
supportsStreaming(): boolean;
createConversation(systemPrompt?: string): LLMConversation;
generateWithTools(options: LLMToolOptions): Promise<LLMToolResponse>;
streamResponse(options: LLMGenerateOptions): AsyncIterable<LLMStreamChunk>;
streamWithTools(options: LLMToolOptions): AsyncIterable<LLMStreamChunk>;
handleToolLoop(conversation: LLMConversation, tools: Tool[]): Promise<LLMToolResponse>;
protected formatMessagesForProvider(messages: ConversationMessage[]): any[];
protected extractToolCallsFromResponse(response: any): any[];
isAvailable(): Promise<boolean>;
test(): Promise<void>;
}
//# sourceMappingURL=BaseLLMProvider.d.ts.map