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

Function get_user_input

smallthinker/tools/run/run.cpp:1123–1138  ·  view source on GitHub ↗

Function to handle user input

Source from the content-addressed store, hash-verified

1121
1122// Function to handle user input
1123static int get_user_input(std::string & user_input, const std::string & user) {
1124 while (true) {
1125 const int ret = handle_user_input(user_input, user);
1126 if (ret == 1) {
1127 return 1;
1128 }
1129
1130 if (ret == 2) {
1131 continue;
1132 }
1133
1134 break;
1135 }
1136
1137 return 0;
1138}
1139
1140// Reads a chat template file to be used
1141static std::string read_chat_template_file(const std::string & chat_template_file) {

Callers 1

chat_loopFunction · 0.85

Calls 1

handle_user_inputFunction · 0.85

Tested by

no test coverage detected