llama.chat

Undocumented in source.

Members

Functions

applyTemplate
string applyTemplate(const(char)* tmpl, const(llama_chat_message)[] chat, bool addAss)

Apply a chat template and return the result as a D string. Allocates a buffer and retries once if it is too small.

builtinTemplates
string[] builtinTemplates()

Names of all built-in chat templates supported by llama_chat_apply_template. Returns a GC-allocated slice of D strings.

chatApplyTemplate
int chatApplyTemplate(const(char)* tmpl, const(llama_chat_message)[] chat, bool addAss, char[] buf)

Apply a Jinja chat template to a list of messages.

Meta