Function to handle user input
| 1121 | |
| 1122 | // Function to handle user input |
| 1123 | static 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 |
| 1141 | static std::string read_chat_template_file(const std::string & chat_template_file) { |
no test coverage detected