MCPcopy Index your code
hub / github.com/THUDM/slime / apply_chat_template

Method apply_chat_template

tests/test_agent_adapters.py:40–43  ·  view source on GitHub ↗
(self, messages, tools=None, tokenize=True, add_generation_prompt=True)

Source from the content-addressed store, hash-verified

38 self.prompts = [list(prompt) for prompt in prompts]
39
40 def apply_chat_template(self, messages, tools=None, tokenize=True, add_generation_prompt=True):
41 self.rendered.append((list(messages), tools))
42 assert self.prompts, "unexpected chat-template render"
43 return self.prompts.pop(0)
44
45
46class FakeSGLang:

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected