mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix: scope voice response parsing to its backend lifetime
This commit is contained in:
1 parent
1a1cbadf5b
commit
c488a18df1
3 files changed
+6
-3
No files matched your search
@@ -7,9 +7,12 @@ export function createRealtimeBackend({
|
||||
tokenTransport = (...args) => fetch(...args),
|
||||
connectionTransport = (...args) => fetch(...args),
|
||||
timeoutMs = 30_000,
|
||||
signal: lifetime,
|
||||
} = {}) {
|
||||
const scoped = (signal) =>
|
||||
AbortSignal.any([signal, AbortSignal.timeout(timeoutMs)].filter(Boolean));
|
||||
AbortSignal.any(
|
||||
[lifetime, signal, AbortSignal.timeout(timeoutMs)].filter(Boolean),
|
||||
);
|
||||
return Object.freeze({
|
||||
protocol: 'openai-realtime',
|
||||
async requestToken({ tier = DEFAULT_VOICE_TIER, signal } = {}) {
|
||||
|
||||
Reference in new issue
Block a user