Files
wehub-resource-sync 770d92cb1f
Lint / lint (push) Has been cancelled
Build Docs / Deploy Docs (push) Has been cancelled
Windows CI / Windows (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:23:58 +08:00

26 lines
644 B
Python

"""GLM default templates"""
from mlc_llm.protocol.conversation_protocol import Conversation, MessagePlaceholders
from .registry import ConvTemplateRegistry
# GLM
ConvTemplateRegistry.register_conv_template(
Conversation(
name="glm",
system_template=f"{MessagePlaceholders.SYSTEM.value}",
system_message="",
roles={
"user": "问",
"assistant": "答",
"tool": "问",
},
seps=["\n\n"],
role_content_sep=": ",
role_empty_sep=":",
stop_str=["</s>"],
stop_token_ids=[2],
system_prefix_token_ids=[64790, 64792],
)
)