mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
8 lines
203 B
Python
8 lines
203 B
Python
def filter_by_schema_keys(obj, schema):
|
|
try:
|
|
return {
|
|
k: v for k, v in obj.items()
|
|
if k in schema or k == "messages"
|
|
}
|
|
except Exception:
|
|
return obj |