OpenAI Realtime needs the assistant context aggregator to have expect_stripped_words=False

This commit is contained in:
Paul Kompfner
2025-10-29 16:15:16 -04:00
parent 8894db4290
commit d0f52feba3
4 changed files with 22 additions and 3 deletions

View File

@@ -14,7 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
```python
context = LLMContext(messages, tools)
context_aggregator = LLMContextAggregatorPair(context)
context_aggregator = LLMContextAggregatorPair(
context,
# This part is `OpenAIRealtimeLLMService`-specific.
# `expect_stripped_words=False` needed when OpenAI Realtime used with
# "audio" modality (the default).
assistant_params=LLMAssistantAggregatorParams(expect_stripped_words=False),
)
```
(Note that even though `OpenAIRealtimeLLMService` now supports the universal