MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / add_message

Function add_message

smallthinker/tools/run/run.cpp:914–917  ·  view source on GitHub ↗

Add a message to `messages` and store its content in `msg_strs`

Source from the content-addressed store, hash-verified

912
913// Add a message to `messages` and store its content in `msg_strs`
914static 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
920static int apply_chat_template(const struct common_chat_templates * tmpls, LlamaData & llama_data, const bool append, bool use_jinja) {

Callers 1

process_user_messageFunction · 0.85

Calls 2

push_backMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected