We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2566fb8 commit 20ca527Copy full SHA for 20ca527
1 file changed
astrbot/core/provider/sources/openai_source.py
@@ -326,7 +326,8 @@ async def _query_stream(
326
exc_info=True,
327
)
328
logger.warning(f"Saving chunk state error: {e}")
329
- if len(chunk.choices) == 0:
+
330
+ if not chunk.choices or len(chunk.choices) == 0:
331
continue
332
delta = chunk.choices[0].delta
333
# logger.debug(f"chunk delta: {delta}")
0 commit comments