import {Stream} from "stream"; export interface Response { text: string | null; other: any; } export interface ResponseStream { text: Stream; other: any; } export interface Request { prompt: string; history?: HistoryItem[]; options?: any; } export interface HistoryItem { question?: string; answer?: string; } export abstract class Chat { public abstract ask(req: Request): Promise public abstract askStream(req: Request): Promise }