2025-03-28 18:59:39 +01:00
|
|
|
def filter_by_schema_keys(obj, schema):
|
|
|
|
|
try:
|
2026-05-13 23:10:35 -07:00
|
|
|
return {k: v for k, v in obj.items() if k in schema or k == "messages"}
|
2025-03-28 18:59:39 +01:00
|
|
|
except Exception:
|
2026-05-13 23:10:35 -07:00
|
|
|
return obj
|