Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clever-pants-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-plugins-openai": patch
---

fix uncatched OAI errors
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,11 @@ def __init__(
async def _run(self) -> None:
if hasattr(self._llm._client, "_refresh_credentials"):
await self._llm._client._refresh_credentials()
if not self._oai_stream:
self._oai_stream = await self._awaitable_oai_stream

try:
if not self._oai_stream:
self._oai_stream = await self._awaitable_oai_stream

async with self._oai_stream as stream:
async for chunk in stream:
for choice in chunk.choices:
Expand Down