UserImageRawFrame: don't deprecate request field

This commit is contained in:
Aleix Conchillo Flaqué
2026-01-13 11:56:13 -08:00
parent 02eace5a16
commit d3c57e2da0
3 changed files with 1 additions and 18 deletions

View File

@@ -1565,7 +1565,7 @@ class UserImageRawFrame(InputImageRawFrame):
user_id: Identifier of the user who provided this image.
text: An optional text associated to this image.
append_to_context: Whether the requested image should be appended to the LLM context.
request: [DEPRECATED] The original image request frame if this is a response.
request: The original image request frame if this is a response.
"""
user_id: str = ""
@@ -1573,20 +1573,6 @@ class UserImageRawFrame(InputImageRawFrame):
append_to_context: Optional[bool] = None
request: Optional[UserImageRequestFrame] = None
def __post_init__(self):
super().__post_init__()
if self.request:
import warnings
with warnings.catch_warnings():
warnings.simplefilter("always")
warnings.warn(
"`UserImageRawFrame` field `request` is deprecated.",
DeprecationWarning,
stacklevel=2,
)
def __str__(self):
pts = format_pts(self.pts)
return f"{self.name}(pts: {pts}, user: {self.user_id}, source: {self.transport_source}, size: {self.size}, format: {self.format}, text: {self.text}, append_to_context: {self.append_to_context})"

View File

@@ -27,7 +27,6 @@ from pipecat.frames.frames import (
CancelFrame,
ControlFrame,
EndFrame,
ErrorFrame,
Frame,
InputAudioRawFrame,
InputTransportMessageFrame,
@@ -1844,7 +1843,6 @@ class DailyInputTransport(BaseInputTransport):
format=video_frame.color_format,
text=request_frame.text if request_frame else None,
append_to_context=request_frame.append_to_context if request_frame else None,
# Deprecated fields below.
request=request_frame,
)
frame.transport_source = video_source

View File

@@ -680,7 +680,6 @@ class SmallWebRTCInputTransport(BaseInputTransport):
format=video_frame.format,
text=request_text,
append_to_context=add_to_context,
# Deprecated fields below.
request=request_frame,
)
image_frame.transport_source = video_source