Add a message to `messages` and store its content in `msg_strs`
| 912 | |
| 913 | // Add a message to `messages` and store its content in `msg_strs` |
| 914 | static void add_message(const char * role, const std::string & text, LlamaData & llama_data) { |
| 915 | llama_data.msg_strs.push_back(std::move(text)); |
| 916 | llama_data.messages.push_back({ role, llama_data.msg_strs.back().c_str() }); |
| 917 | } |
| 918 | |
| 919 | // Function to apply the chat template and resize `formatted` if needed |
| 920 | static int apply_chat_template(const struct common_chat_templates * tmpls, LlamaData & llama_data, const bool append, bool use_jinja) { |
no test coverage detected