initial public release.

This commit is contained in:
Xiaohan-Tian
2025-08-11 18:37:21 -07:00
commit de51967b49
186 changed files with 32322 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import type { StreamChunk, LLMResponse } from './StreamingTypes';
import type { Message } from '../core/AgentState';
/**
* Abstract interface for LLM providers
*/
export abstract class LLMProvider {
abstract name: string;
/**
* Generate a streaming response from the LLM
* @param messages The full conversation history with preserved roles
* @param systemPrompt The system prompt (optional, can be included in messages)
* @param tools Available tools (optional for now)
*/
abstract generateStream(
messages: Message[],
systemPrompt?: string,
tools?: Record<string, unknown>[]
): AsyncIterableIterator<StreamChunk>;
/**
* Generate a complete response from the LLM (non-streaming)
* @param messages The full conversation history with preserved roles
* @param systemPrompt The system prompt (optional, can be included in messages)
* @param tools Available tools (optional for now)
*/
abstract generateCompletion(
messages: Message[],
systemPrompt?: string,
tools?: Record<string, unknown>[]
): Promise<LLMResponse>;
}