[model] support MiniCPM-o-4.5 (#10163)

Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
This commit is contained in:
Hertz
2026-02-04 23:21:27 +08:00
committed by GitHub
parent 1a02717fa8
commit 8bedfafa4e
7 changed files with 22 additions and 18 deletions

View File

@@ -13,14 +13,14 @@
# limitations under the License.
import time
from enum import Enum, unique
from enum import StrEnum, unique
from typing import Any, Literal
from pydantic import BaseModel, Field
@unique
class Role(str, Enum):
class Role(StrEnum):
USER = "user"
ASSISTANT = "assistant"
SYSTEM = "system"
@@ -29,7 +29,7 @@ class Role(str, Enum):
@unique
class Finish(str, Enum):
class Finish(StrEnum):
STOP = "stop"
LENGTH = "length"
TOOL = "tool_calls"