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

Function format_redpajama_incite

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

Source from the content-addressed store, hash-verified

1199
1200@register_chat_format("redpajama-incite")
1201def format_redpajama_incite(
1202 messages: List[llama_types.ChatCompletionRequestMessage],
1203 **kwargs: Any,
1204) -> ChatFormatterResponse:
1205 _system_message = _get_system_message(messages)
1206 _roles = dict(user="<human>", assistant="<bot>")
1207 _sep = "\n"
1208 _stop = "<human>"
1209 system_message = _system_message
1210 _messages = _map_roles(messages, _roles)
1211 _messages.append((_roles["assistant"], None))
1212 _prompt = _format_add_colon_single(system_message, _messages, _sep)
1213 return ChatFormatterResponse(prompt=_prompt, stop=_stop)
1214
1215
1216@register_chat_format("snoozy")

Callers

nothing calls this directly

Calls 5

_get_system_messageFunction · 0.85
_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…