MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / format_intel

Function format_intel

llama_cpp/llama_chat_format.py:1253–1263  ·  view source on GitHub ↗
(
    messages: List[llama_types.ChatCompletionRequestMessage],
    **kwargs: Any,
)

Source from the content-addressed store, hash-verified

1251
1252@register_chat_format("intel")
1253def format_intel(
1254 messages: List[llama_types.ChatCompletionRequestMessage],
1255 **kwargs: Any,
1256) -> ChatFormatterResponse:
1257 _roles = dict(user="### User:", assistant="### Assistant:")
1258 _sep = "\n"
1259 _system_message = "### System:\n{system_message}"
1260 _messages = _map_roles(messages, _roles)
1261 _messages.append((_roles["assistant"], None))
1262 _prompt = _format_add_colon_single(_system_message, _messages, _sep)
1263 return ChatFormatterResponse(prompt=_prompt)
1264
1265
1266@register_chat_format("open-orca")

Callers

nothing calls this directly

Calls 4

_map_rolesFunction · 0.85
_format_add_colon_singleFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…