feat: move useGetWebsocketUrlQuery for websocket URL retrieval; update imports and add Google provider to RealtimeVoiceProviders enum

This commit is contained in:
Marco Beretta 2025-04-05 10:09:55 +02:00
parent 483a7da4c8
commit 77ca00c87b
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
5 changed files with 22 additions and 13 deletions

View file

@ -1234,6 +1234,10 @@ export enum RealtimeVoiceProviders {
* Provider for OpenAI Realtime Voice API
*/
OPENAI = 'openai',
/**
* Provider for Google Realtime Voice API
*/
GOOGLE = 'google',
}
/** Enum for app-wide constants */

View file

@ -376,14 +376,3 @@ export const useGetCustomConfigSpeechQuery = (
},
);
};
export const useGetWebsocketUrlQuery = (
config?: UseQueryOptions<t.TWebsocketUrlResponse>,
): QueryObserverResult<t.TWebsocketUrlResponse> => {
return useQuery<t.TWebsocketUrlResponse>([QueryKeys.websocketUrl], () => dataService.getWebsocketUrl(), {
refetchOnWindowFocus: false,
refetchOnReconnect: false,
refetchOnMount: false,
...config,
});
};

View file

@ -10,7 +10,8 @@ import type {
TConversationTag,
TBanner,
} from './schemas';
import { string } from 'zod';
export type TOpenAIMessage = OpenAI.Chat.ChatCompletionMessageParam;
export * from './schemas';