[Feature] Streaming video input with EVS frame filtering (RFC #2201 Phase 2-4) (#2342)

Signed-off-by: Sy03 <1370724210@qq.com>
Co-authored-by: shimei.jmh <shimei.jmh@taobao.com>
Co-authored-by: SYLAR <125541396+lishunyang12@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-04-24 22:54:35 +08:00
1 parent b8bd6fbbdb
commit 7b876324c2
14 files changed
+3597

No files matched your search

@@ -0,0 +1,28 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Small helpers shared by streaming video handlers."""
from __future__ import annotations
from typing import Any
def text_only_message(message: dict[str, Any]) -> dict[str, Any]:
"""Return a history message with multimodal content stripped out."""
role = message.get("role", "user")
content = message.get("content", "")
if isinstance(content, str):
return {"role": role, "content": content}
if not isinstance(content, list):
return {"role": role, "content": ""}
text_parts: list[str] = []
for part in content:
if isinstance(part, dict) and part.get("type") == "text":
text = part.get("text")
if isinstance(text, str):
text_parts.append(text)
return {"role": role, "content": "".join(text_parts)}