Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Fix inquire mode crash on Azure when streaming chunks have empty choices (#246)

Murtaza Nasir4cb8d4c0d72a
diff --git a/src/api/inquire.py b/src/api/inquire.py
index 2b510b0e..440ad245 100644
--- a/src/api/inquire.py
+++ b/src/api/inquire.py
@@ -678,6 +678,8 @@ Order your response with notes from the most recent meetings first. Always use p
thinking_buffer = ""
for chunk in stream:
+ if not chunk.choices:
+ continue
content = chunk.choices[0].delta.content
if content:
response_buffer += content