UNPKG

@coherenceplatform/sdk

Version:

Coherence SDK for embedding AI-powered chat into your applications

65 lines 1.88 kB
export class StreamHandler { activeStreams: Map<any, any>; activeToolCalls: Map<any, any>; handleStreamChunk(requestId: any, chunk: any): void; handleStreamComplete(requestId: any, finalData?: any): void; handleStreamError(requestId: any, error: any): void; setupStream(requestId: any, callbacks: any): void; hasStream(requestId: any): boolean; processStreamEvent(eventData: any, currentContent: any): { shouldYield: boolean; content: any; toolCalls: any[]; shouldReturn?: undefined; metadata?: undefined; error?: undefined; } | { shouldReturn: boolean; content: any; metadata: any; toolCalls: any[]; shouldYield?: undefined; error?: undefined; } | { error: any; shouldYield?: undefined; content?: undefined; toolCalls?: undefined; shouldReturn?: undefined; metadata?: undefined; } | { shouldYield?: undefined; content?: undefined; toolCalls?: undefined; shouldReturn?: undefined; metadata?: undefined; error?: undefined; }; createToolCall(eventData: any): { id: any; function: { name: any; arguments: {}; }; status: string; startTime: number; timestamp: any; }; updateToolCallOnEnd(toolCall: any, eventData: any): any; updateToolCallOnError(toolCall: any, eventData: any): any; createContentArray(text: any, toolCalls?: any[]): { type: string; text: any; }[]; getToolStatus(toolCall: any): { type: string; reason: string; error: any; } | { type: string; reason?: undefined; error?: undefined; }; destroy(): void; } //# sourceMappingURL=stream-handler.d.ts.map