Fixed an issue in GoogleLLMService where interruptions did not work when an interruption strategy was used.
This commit is contained in:
@@ -92,6 +92,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue in `GoogleLLMService` where interruptions did not work when an
|
||||||
|
interruption strategy was used.
|
||||||
|
|
||||||
- Fixed an issue in the `TranscriptProcessor` where newline characters could
|
- Fixed an issue in the `TranscriptProcessor` where newline characters could
|
||||||
cause the transcript output to be corrupted (e.g. missing all spaces).
|
cause the transcript output to be corrupted (e.g. missing all spaces).
|
||||||
|
|
||||||
|
|||||||
@@ -84,21 +84,13 @@ class GoogleUserContextAggregator(OpenAIUserContextAggregator):
|
|||||||
Content and Part message format for user messages.
|
Content and Part message format for user messages.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
async def push_aggregation(self):
|
async def handle_aggregation(self, aggregation: str):
|
||||||
"""Push aggregated user text as a Google Content message."""
|
"""Add the aggregated user text to the context as a Google Content message.
|
||||||
if len(self._aggregation) > 0:
|
|
||||||
self._context.add_message(Content(role="user", parts=[Part(text=self._aggregation)]))
|
|
||||||
|
|
||||||
# Reset the aggregation. Reset it before pushing it down, otherwise
|
Args:
|
||||||
# if the tasks gets cancelled we won't be able to clear things up.
|
aggregation: The aggregated user text to add as a user message.
|
||||||
self._aggregation = ""
|
"""
|
||||||
|
self._context.add_message(Content(role="user", parts=[Part(text=aggregation)]))
|
||||||
# Push context frame
|
|
||||||
frame = OpenAILLMContextFrame(self._context)
|
|
||||||
await self.push_frame(frame)
|
|
||||||
|
|
||||||
# Reset our accumulator state.
|
|
||||||
await self.reset()
|
|
||||||
|
|
||||||
|
|
||||||
class GoogleAssistantContextAggregator(OpenAIAssistantContextAggregator):
|
class GoogleAssistantContextAggregator(OpenAIAssistantContextAggregator):
|
||||||
|
|||||||
Reference in New Issue
Block a user