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:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user