fix: voice_mode break fix (#8014)
* 🔧 (use-get-messages-polling.ts): refactor enqueuePolling method to simplify logic and improve readability 🔧 (use-get-messages-polling.ts): refactor startNextPolling method to remove unnecessary code and improve efficiency 🔧 (use-get-messages-polling.ts): refactor removeFromQueue method to simplify and improve maintainability 🔧 (use-get-messages-polling.ts): refactor useGetMessagesPollingMutation to handle stopping polling and removing from queue 🔧 (use-get-transactions.ts): add early return to getTransactionsFn to handle empty id case 🔧 (use-get-voice-list.ts): refactor useGetVoiceList function to handle empty elevenlabsApiKey case and improve readability 🔧 (audio-settings-dialog.tsx): update useGetVoiceList call to pass elevenLabsApiKey as argument * queues should hold payloads not strings * ✨ (use-get-global-variables.ts): add setGlobalVariablesEntities function to store global variables entities for use in the application ✨ (audio-settings-dialog.tsx): introduce debounced function to update ElevenLabs API key in global variables entities 📝 (globalVariables.ts): add setGlobalVariablesEntities function to the global variables store for managing entities 📝 (index.ts): define GlobalVariable type for global variables entities in the store * ✨ (frontend): add support for extracting flowId from URL query parameters to allow direct linking to specific flow logs. --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
parent
0e6fc94dad
commit
9096293e52
9 changed files with 74 additions and 44 deletions
|
|
@ -1143,8 +1143,8 @@ async def flow_tts_websocket(
|
|||
try:
|
||||
await client_websocket.accept()
|
||||
|
||||
openai_send_q: asyncio.Queue[str] = asyncio.Queue()
|
||||
client_send_q: asyncio.Queue[str] = asyncio.Queue()
|
||||
openai_send_q: asyncio.Queue[dict] = asyncio.Queue()
|
||||
client_send_q: asyncio.Queue[dict] = asyncio.Queue()
|
||||
|
||||
log_event = create_event_logger()
|
||||
|
||||
|
|
@ -1171,13 +1171,13 @@ async def flow_tts_websocket(
|
|||
def openai_send(payload):
|
||||
log_event(payload, LF_TO_OPENAI)
|
||||
logger.trace(f"Sending text {LF_TO_OPENAI}: {payload['type']}")
|
||||
openai_send_q.put_nowait(json.dumps(payload))
|
||||
openai_send_q.put_nowait(payload)
|
||||
logger.trace("JSON sent.")
|
||||
|
||||
def client_send(payload):
|
||||
log_event(payload, LF_TO_CLIENT)
|
||||
logger.trace(f"Sending JSON {LF_TO_CLIENT}: {payload['type']}")
|
||||
client_send_q.put_nowait(json.dumps(payload))
|
||||
client_send_q.put_nowait(payload)
|
||||
logger.trace("JSON sent.")
|
||||
|
||||
async def close():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue