Expose has_function_calls_in_progress property
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added a property called `has_function_calls_in_progress` in
|
||||||
|
`LLMAssistantContextAggregator` that exposes whether a function call is in
|
||||||
|
progress.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fixed an issue with `GroqTTSService` where it was not properly parsing the
|
- Fixed an issue with `GroqTTSService` where it was not properly parsing the
|
||||||
WAV file header.
|
WAV file header.
|
||||||
|
|
||||||
- Fixed an issue with `GoogleSTTService` where it was constantly reconnecting
|
- Fixed an issue with `GoogleSTTService` where it was constantly reconnecting
|
||||||
|
|
||||||
|
- Fixed an issue with `GoogleSTTService` where it was constantly reconnecting
|
||||||
before starting to receive audio from the user.
|
before starting to receive audio from the user.
|
||||||
|
|
||||||
- Fixed an issue where `GoogleLLMService`'s TTFB value was incorrect.
|
- Fixed an issue where `GoogleLLMService`'s TTFB value was incorrect.
|
||||||
|
|||||||
@@ -504,6 +504,15 @@ class LLMAssistantContextAggregator(LLMContextResponseAggregator):
|
|||||||
self._function_calls_in_progress: Dict[str, Optional[FunctionCallInProgressFrame]] = {}
|
self._function_calls_in_progress: Dict[str, Optional[FunctionCallInProgressFrame]] = {}
|
||||||
self._context_updated_tasks: Set[asyncio.Task] = set()
|
self._context_updated_tasks: Set[asyncio.Task] = set()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_function_calls_in_progress(self) -> bool:
|
||||||
|
"""Check if there are any function calls currently in progress.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: True if function calls are in progress, False otherwise
|
||||||
|
"""
|
||||||
|
return bool(self._function_calls_in_progress)
|
||||||
|
|
||||||
async def handle_aggregation(self, aggregation: str):
|
async def handle_aggregation(self, aggregation: str):
|
||||||
self._context.add_message({"role": "assistant", "content": aggregation})
|
self._context.add_message({"role": "assistant", "content": aggregation})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user