diff options
Diffstat (limited to 'websocket-server/src/types.ts')
| -rw-r--r-- | websocket-server/src/types.ts | 31 |
1 files changed, 31 insertions, 0 deletions
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<string, { type: string; description?: string }>; + required: string[]; + }; +} + +export interface FunctionHandler { + schema: FunctionSchema; + handler: (args: any) => Promise<string>; +} |
