google: updgrade OpenAILLMContext to GoogleLLMContext
This commit is contained in:
@@ -47,6 +47,9 @@ stt = DeepgramSTTService(..., live_options=LiveOptions(model="nova-2-general"))
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue that was not allowing to pass an `OpenAILLMContext` to create
|
||||||
|
`GoogleLLMService`'s context aggregators.
|
||||||
|
|
||||||
- Fixed a `ElevenLabsTTSService`, `FishAudioTTSService`, `LMNTTTSService` and
|
- Fixed a `ElevenLabsTTSService`, `FishAudioTTSService`, `LMNTTTSService` and
|
||||||
`PlayHTTTSService` issue that was resulting in audio requested before an
|
`PlayHTTTSService` issue that was resulting in audio requested before an
|
||||||
interruption being played after an interruption.
|
interruption being played after an interruption.
|
||||||
|
|||||||
@@ -1176,6 +1176,8 @@ class GoogleLLMService(LLMService):
|
|||||||
def create_context_aggregator(
|
def create_context_aggregator(
|
||||||
context: OpenAILLMContext, *, assistant_expect_stripped_words: bool = True
|
context: OpenAILLMContext, *, assistant_expect_stripped_words: bool = True
|
||||||
) -> GoogleContextAggregatorPair:
|
) -> GoogleContextAggregatorPair:
|
||||||
|
if isinstance(context, OpenAILLMContext):
|
||||||
|
context = GoogleLLMContext.upgrade_to_google(context)
|
||||||
user = GoogleUserContextAggregator(context)
|
user = GoogleUserContextAggregator(context)
|
||||||
assistant = GoogleAssistantContextAggregator(
|
assistant = GoogleAssistantContextAggregator(
|
||||||
context, expect_stripped_words=assistant_expect_stripped_words
|
context, expect_stripped_words=assistant_expect_stripped_words
|
||||||
|
|||||||
Reference in New Issue
Block a user