Print the values of a sublist of `llama_tokens & inp` to a string in the form [v0, v1, v2, ...].
| 21 | |
| 22 | // Print the values of a sublist of `llama_tokens & inp` to a string in the form [v0, v1, v2, ...]. |
| 23 | static std::string common_tokens_to_str(const llama_tokens & inp, size_t start, size_t length) { |
| 24 | std::ostringstream oss; |
| 25 | oss << '['; |
| 26 | for (size_t i = 0; i < length; ++i) { |
| 27 | if (i > 0) { |
| 28 | oss << ", "; |
| 29 | } |
| 30 | oss << inp[start + i]; |
| 31 | } |
| 32 | oss << ']'; |
| 33 | return oss.str(); |
| 34 | } |
| 35 | |
| 36 | |
| 37 | // n-gram simple |
no test coverage detected