fix(streaming_utils.py): fix generic_chunk_has_all_required_fields

This commit is contained in:
Krrish Dholakia 2024-08-26 21:13:02 -07:00
parent 8e9acd117b
commit 9ba1b78a8f

View file

@ -10,9 +10,5 @@ def generic_chunk_has_all_required_fields(chunk: dict) -> bool:
"""
_all_fields = GChunk.__annotations__
# this is an optional field in GenericStreamingChunk, it's not required to be present
_all_fields.pop("provider_specific_fields", None)
decision = all(key in _all_fields for key in chunk)
return decision