Merge pull request #2727 from pipecat-ai/pk/strands-agents-needs-to-support-openaillmcontextframe-for-now

`StrandsAgentsProcessor` should still support `OpenAILLMContextFrame`…
This commit is contained in:
Aleix Conchillo Flaqué
2025-09-24 11:05:07 -07:00
committed by GitHub

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]