LLMAssistantContextAggregator: remove tool call id with image requests

This commit is contained in:
Aleix Conchillo Flaqué
2025-03-19 14:06:22 -07:00
parent 3e9678db84
commit 1f6ed01ba6
2 changed files with 15 additions and 1 deletions

View File

@@ -511,6 +511,18 @@ class LLMAssistantContextAggregator(LLMContextResponseAggregator):
del self._function_calls_in_progress[frame.tool_call_id]
async def _handle_user_image_frame(self, frame: UserImageRawFrame):
logger.debug(
f"{self} UserImageRawFrame: [{frame.request.function_name}:{frame.request.tool_call_id}]"
)
if frame.request.tool_call_id not in self._function_calls_in_progress:
logger.warning(
f"UserImageRawFrame tool_call_id [{frame.request.tool_call_id}] is not running"
)
return
del self._function_calls_in_progress[frame.request.tool_call_id]
await self.handle_user_image_frame(frame)
await self.push_aggregation()
await self.push_context_frame(FrameDirection.UPSTREAM)

View File

@@ -286,7 +286,9 @@ class LLMService(AIService):
else:
return
logger.info(f"Calling function {function_name} with arguments {arguments}")
logger.debug(
f"{self} Calling function [{function_name}:{tool_call_id}] with arguments {arguments}"
)
# NOTE(aleix): This needs to be removed after we remove the deprecation.
await self.call_start_function(context, function_name)