StrandsAgentsProcessor should still support OpenAILLMContextFrame until that frame has been deprecated

This commit is contained in:
Paul Kompfner
2025-09-24 11:05:27 -04:00
parent 463752360b
commit 65f5fe8588

View File

@@ -16,6 +16,7 @@ from pipecat.frames.frames import (
LLMTextFrame,
)
from pipecat.metrics.metrics import LLMTokenUsage
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContextFrame
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
try:
@@ -71,7 +72,7 @@ class StrandsAgentsProcessor(FrameProcessor):
direction: The direction of frame flow in the pipeline.
"""
await super().process_frame(frame, direction)
if isinstance(frame, LLMContextFrame):
if isinstance(frame, (LLMContextFrame, OpenAILLMContextFrame)):
messages = frame.context.get_messages()
if messages:
last_message = messages[-1]