Expand description
Chat templates (llama_chat_apply_template).
Mirrors the llama-cpp-2 anchor’s chat-template API (LlamaChatMessage,
LlamaChatTemplate, [LlamaModel::chat_template],
[LlamaModel::apply_chat_template]), adapted to ik_llama.cpp’s C signatures.
Structs§
- Llama
Chat Message - A safe wrapper around
llama_chat_message. - Llama
Chat Template - A performance-friendly wrapper around
LlamaModel::chat_templatewhich is then fed intoLlamaModel::apply_chat_templateto convert a list of messages into an LLM prompt. Internally the template is stored as aCStringto avoid round-trip conversions within the FFI.
Enums§
- Apply
Chat Template Error - Failed to apply a chat template (see
LlamaModel::apply_chat_template). - NewLlama
Chat Message Error - Failed to construct a
LlamaChatMessage.