ws.d.ts 923 B

1234567891011121314151617181920212223
  1. import * as WS from 'ws';
  2. import { AzureOpenAI, OpenAI } from "../../index.js";
  3. import type { RealtimeClientEvent } from "../../resources/beta/realtime/realtime.js";
  4. import { OpenAIRealtimeEmitter } from "./internal-base.js";
  5. export declare class OpenAIRealtimeWS extends OpenAIRealtimeEmitter {
  6. url: URL;
  7. socket: WS.WebSocket;
  8. constructor(props: {
  9. model: string;
  10. options?: WS.ClientOptions | undefined;
  11. }, client?: Pick<OpenAI, 'apiKey' | 'baseURL'>);
  12. static azure(client: Pick<AzureOpenAI, '_getAzureADToken' | 'apiVersion' | 'apiKey' | 'baseURL' | 'deploymentName'>, options?: {
  13. deploymentName?: string;
  14. options?: WS.ClientOptions | undefined;
  15. }): Promise<OpenAIRealtimeWS>;
  16. send(event: RealtimeClientEvent): void;
  17. close(props?: {
  18. code: number;
  19. reason: string;
  20. }): void;
  21. }
  22. //# sourceMappingURL=ws.d.ts.map