[Refactor][GPT-OSS] Harmony Responses API Refactor to use HarmonyParser (#47185)
Signed-off-by: Yifan Zong <yzong@redhat.com>
This commit is contained in:
@@ -251,7 +251,13 @@ def _validate_field_consistency(events: list) -> None:
|
||||
"response.reasoning_part.added",
|
||||
):
|
||||
_assert_item_fields(event, etype, active_item_id, active_output_index)
|
||||
active_content_index = getattr(event, "content_index", None)
|
||||
content_index = getattr(event, "content_index", None)
|
||||
if active_content_index is None:
|
||||
assert content_index == 0, (
|
||||
f"{etype} for a new item must start at content_index 0, "
|
||||
f"got {content_index}"
|
||||
)
|
||||
active_content_index = content_index
|
||||
continue
|
||||
|
||||
# --- all other item-level events --------------------------
|
||||
|
||||
Reference in New Issue
Block a user