From 20009aed53d8864c9204d43a17895168a777d2cc Mon Sep 17 00:00:00 2001 From: Ilan Bigio Date: Mon, 16 Dec 2024 13:06:08 -0800 Subject: Initial commit --- websocket-server/src/types.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 websocket-server/src/types.ts (limited to 'websocket-server/src/types.ts') diff --git a/websocket-server/src/types.ts b/websocket-server/src/types.ts new file mode 100644 index 0000000..6c544c9 --- /dev/null +++ b/websocket-server/src/types.ts @@ -0,0 +1,31 @@ +import { WebSocket } from "ws"; + +export interface Session { + twilioConn?: WebSocket; + frontendConn?: WebSocket; + modelConn?: WebSocket; + config?: any; + streamSid?: string; +} + +export interface FunctionCallItem { + name: string; + arguments: string; + call_id?: string; +} + +export interface FunctionSchema { + name: string; + type: "function"; + description?: string; + parameters: { + type: string; + properties: Record; + required: string[]; + }; +} + +export interface FunctionHandler { + schema: FunctionSchema; + handler: (args: any) => Promise; +} -- cgit v1.2.3