adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
65 lines (64 loc) • 2.29 kB
TypeScript
import { BaseLlm } from './BaseLlm';
import { LlmRequest } from './LlmRequest';
import { LlmResponse } from './LlmResponse';
export declare class TextChunk {
text: string;
constructor(text: string);
}
export declare class FunctionChunk {
id?: string | null | undefined;
name?: string | null | undefined;
args?: string | null | undefined;
constructor(id?: string | null | undefined, name?: string | null | undefined, args?: string | null | undefined);
}
/**
* LiteLLM client for making completions
* This implementation uses any types in places where strict typing is challenging
* due to differences between the TypeScript and JavaScript implementations
*/
export declare class LiteLLMClient {
/**
* Asynchronously calls completion
* @param model The model name
* @param messages The messages to send
* @param tools The tools to use
* @param kwargs Additional arguments
* @returns A promise resolving to the model response
*/
acompletion(model: string, messages: any[], tools?: any[], ...kwargs: any[]): Promise<any>;
/**
* Synchronously calls completion
* @param model The model name
* @param messages The messages to send
* @param tools The tools to use
* @param stream Whether to stream the response
* @param kwargs Additional arguments
* @returns An iterable of model responses
*/
completion(model: string, messages: any[], tools?: any[], stream?: boolean, ...kwargs: any[]): any;
}
/**
* LiteLlm class - wrapper around LiteLLM
*/
export declare class LiteLlm extends BaseLlm {
llmClient: LiteLLMClient;
private _additionalArgs;
/**
* Constructor
* @param model The model name
* @param additionalArgs Additional arguments
*/
constructor(model: string, additionalArgs?: Record<string, any>);
/**
* Generate content asynchronously
* @param llmRequest The request
* @param stream Whether to stream
* @returns AsyncGenerator yielding responses
*/
generateContentAsync(llmRequest: LlmRequest, stream?: boolean): AsyncGenerator<LlmResponse, void, unknown>;
/**
* List of supported models
* @returns Empty array - LiteLlm supports all models
*/
static supportedModels(): string[];
}