[Frontend] Port chat_parsing core from Transformers (#58602)

Signed-off-by: Yoni Gozlan <yonigozlan@users.noreply.github.com>
Co-authored-by: Yoni Gozlan <yonigozlan@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Yoni Gozlan
2026-10-01 00:21:02 +08:00
committed by GitHub
co-authored by Yoni Gozlan Cursor mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 42a3dd5fec
commit 73a5831127
5 changed files with 2600 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# Copyright 2026 The HuggingFace Team. All rights reserved.
# ruff: noqa
# fmt: off
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Response parsing: convert model-emitted text into the assistant-message
dict used by chat templates, driven by a declarative `response_template` spec."""
from .response_parser import ResponseParser, parse_response
__all__ = ["ResponseParser", "parse_response"]
# fmt: on