Fix LLMTask._finish_function_call to bypass deferral
self.queue_frame would defer the LLMMessagesAppendFrame because _finish_function_call always runs inside a tool call. The subsequent _flush_pipeline() then returned before the goodbye/handoff LLM output was actually delivered. Use super().queue_frame to push the frame straight into the pipeline, matching the pattern used in _flush_pipeline().
This commit is contained in:
@@ -327,7 +327,10 @@ class LLMTask(PipelineTask):
|
||||
messages: Optional LLM messages to inject before completing.
|
||||
"""
|
||||
if messages:
|
||||
await self.queue_frame(LLMMessagesAppendFrame(messages=messages, run_llm=True))
|
||||
# Bypass our deferral override: this runs inside a tool call, so
|
||||
# self.queue_frame would defer the frame and the flush below would
|
||||
# return before the LLM output is delivered.
|
||||
await super().queue_frame(LLMMessagesAppendFrame(messages=messages, run_llm=True))
|
||||
await self._flush_pipeline()
|
||||
|
||||
if not result_callback:
|
||||
|
||||
Reference in New Issue
Block a user