services: ignore yielded None values
This commit is contained in:
@@ -26,6 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue in `AIService` that would cause a yielded `None` value to be
|
||||||
|
processed.
|
||||||
|
|
||||||
- RTVI's `bot-ready` message is now sent when the RTVI pipeline is ready and
|
- RTVI's `bot-ready` message is now sent when the RTVI pipeline is ready and
|
||||||
a first participant joins.
|
a first participant joins.
|
||||||
|
|
||||||
|
|||||||
@@ -75,10 +75,11 @@ class AIService(FrameProcessor):
|
|||||||
|
|
||||||
async def process_generator(self, generator: AsyncGenerator[Frame, None]):
|
async def process_generator(self, generator: AsyncGenerator[Frame, None]):
|
||||||
async for f in generator:
|
async for f in generator:
|
||||||
if isinstance(f, ErrorFrame):
|
if f:
|
||||||
await self.push_error(f)
|
if isinstance(f, ErrorFrame):
|
||||||
else:
|
await self.push_error(f)
|
||||||
await self.push_frame(f)
|
else:
|
||||||
|
await self.push_frame(f)
|
||||||
|
|
||||||
|
|
||||||
class AsyncAIService(AsyncFrameProcessor):
|
class AsyncAIService(AsyncFrameProcessor):
|
||||||
|
|||||||
Reference in New Issue
Block a user