mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
feat(voice): add ChatGPT OAuth auth option
This commit is contained in:
1 parent
b210ab0fe4
commit
881e24485c
23 files changed
+918
-34
No files matched your search
@@ -1,13 +1,17 @@
|
||||
import { defaultSourceRoot } from './common/source-root.js';
|
||||
import { handleHudSummary } from './openai/hud-summary.js';
|
||||
import { createDebugLogHandler } from './openai/debug-log.js';
|
||||
import { createRealtimeTokenHandler } from './openai/realtime.js';
|
||||
import {
|
||||
createRealtimeOAuthLoginHandler,
|
||||
createRealtimeOAuthStatusHandler,
|
||||
createRealtimeTokenHandler,
|
||||
} from './openai/realtime.js';
|
||||
|
||||
/**
|
||||
* Vite plugin: OpenAI Realtime ephemeral client secret.
|
||||
*
|
||||
* Keeps OPENAI_API_KEY server-side while the browser connects to the
|
||||
* Realtime API over WebRTC with a short-lived secret.
|
||||
* Keeps the selected cloud credential server-side while the browser connects
|
||||
* to the Realtime API over WebRTC with a short-lived secret.
|
||||
*/
|
||||
function openAiRealtimeProxy({
|
||||
sourceRoot = defaultSourceRoot,
|
||||
@@ -26,6 +30,16 @@ function openAiRealtimeProxy({
|
||||
'/api/realtime/token',
|
||||
createRealtimeTokenHandler({ ...realtime, annotationGuidance }),
|
||||
);
|
||||
|
||||
middlewares.use(
|
||||
'/api/realtime/oauth-status',
|
||||
createRealtimeOAuthStatusHandler(realtime),
|
||||
);
|
||||
|
||||
middlewares.use(
|
||||
'/api/realtime/oauth-login',
|
||||
createRealtimeOAuthLoginHandler(realtime),
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user