@aj-archipelago/cortex
Version:
Cortex is a GraphQL API for AI. It provides a simple, extensible interface for using AI services from OpenAI, Azure and others.
29 lines (25 loc) • 841 B
text/typescript
import type {RealtimeItem} from "./realtimeTypes";
type DeltaType = {
transcript?: string;
audio?: string;
text?: string;
arguments?: string;
};
export interface ServerToClientEvents {
error: (message: string) => void;
ready: () => void;
conversationUpdated: (item: RealtimeItem, delta: DeltaType) => void;
conversationInterrupted: () => void;
imageCreated: (imageUrl: string) => void;
requestScreenshot: () => void;
}
export interface ClientToServerEvents {
sendMessage: (message: string) => void;
appendAudio: (audio: string) => void;
cancelResponse: () => void;
conversationCompleted: () => void;
audioPlaybackComplete: (trackId: string) => void;
screenshotError: (error: string) => void;
screenshotChunk: (chunk: string, index: number) => void;
screenshotComplete: (totalChunks: number) => void;
}