File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1313
1414from agents .realtime import RealtimeRunner , RealtimeSession , RealtimeSessionEvent
1515from agents .realtime .config import RealtimeUserInputMessage
16+ from agents .realtime .items import RealtimeItem
1617from agents .realtime .model import RealtimeModelConfig
1718from agents .realtime .model_inputs import RealtimeModelSendRawMessage
1819
@@ -118,9 +119,9 @@ async def _process_events(self, session_id: str):
118119 print (e )
119120 logger .error (f"Error processing events for session { session_id } : { e } " )
120121
121- def _sanitize_history_item (self , item : Any ) -> dict [str , Any ]:
122+ def _sanitize_history_item (self , item : RealtimeItem ) -> dict [str , Any ]:
122123 """Remove large binary payloads from history items while keeping transcripts."""
123- item_dict = item .model_dump (mode = "json" )
124+ item_dict = item .model_dump ()
124125 content = item_dict .get ("content" )
125126 if isinstance (content , list ):
126127 sanitized_content : list [Any ] = []
You can’t perform that action at this time.
0 commit comments