Add filters in 22b and 22c examples to prevent function call results triggering the "statement judge" LLM from running unnecessarily, and with the wrong system prompt, which would result in garbled output statements comprised of both LLMs outputs combined

This commit is contained in:
Paul Kompfner
2025-09-23 16:14:36 -04:00
parent 678dd22b8e
commit 677f69971c
2 changed files with 8 additions and 0 deletions

View File

@@ -237,6 +237,9 @@ class TurnDetectionLLM(Pipeline):
or isinstance(frame, FunctionCallResultFrame)
)
async def filter_all(frame):
return False
super().__init__(
[
ParallelPipeline(
@@ -247,6 +250,7 @@ class TurnDetectionLLM(Pipeline):
statement_judge_context_filter,
statement_llm,
completeness_check,
FunctionFilter(filter=filter_all, direction=FrameDirection.UPSTREAM),
],
[
# Block everything except frames that trigger LLM inference.

View File

@@ -431,6 +431,9 @@ class TurnDetectionLLM(Pipeline):
or isinstance(frame, FunctionCallResultFrame)
)
async def filter_all(frame):
return False
super().__init__(
[
ParallelPipeline(
@@ -446,6 +449,7 @@ class TurnDetectionLLM(Pipeline):
statement_judge_context_filter,
statement_llm,
completeness_check,
FunctionFilter(filter=filter_all, direction=FrameDirection.UPSTREAM),
],
[
# Block everything except frames that trigger LLM inference.