You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# /// Apply chat template. Inspired by hf apply_chat_template() on python.
2953
2946
# /// Both "model" and "custom_template" are optional, but at least one is required. "custom_template" has higher precedence than "model"
2954
2947
# /// NOTE: This function does not use a jinja parser. It only support a pre-defined list of template. See more: https://github.com/ggerganov/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template
2955
-
# /// @param tmpl A Jinja template to use for this chat. If this is nullptr, the model’s default chat template will be used instead.
2948
+
# /// @param tmpl A Jinja template to use for this chat. If this is nullptr, the model's default chat template will be used instead.
2956
2949
# /// @param chat Pointer to a list of multiple llama_chat_message
2957
2950
# /// @param n_msg Number of llama_chat_message in this chat
2958
2951
# /// @param add_ass Whether to end the prompt with the token(s) that indicate the start of an assistant message.
2959
2952
# /// @param buf A buffer to hold the output formatted prompt. The recommended alloc size is 2 * (total number of characters of all messages)
2960
2953
# /// @param length The size of the allocated buffer
2961
2954
# /// @return The total number of bytes of the formatted prompt. If is it larger than the size of buffer, you may need to re-alloc it and then re-apply the template.
0 commit comments