| 259 | // TODO: reuse llama_detokenize |
| 260 | template <class Iter> |
| 261 | static std::string tokens_to_str(llama_context *ctx, Iter begin, Iter end) |
| 262 | { |
| 263 | std::string ret; |
| 264 | for (; begin != end; ++begin) |
| 265 | { |
| 266 | ret += llama_token_to_piece(ctx, *begin); |
| 267 | } |
| 268 | return ret; |
| 269 | } |
| 270 | |
| 271 | static void server_log(const char *level, const char *function, int line, |
| 272 | const char *message, const nlohmann::ordered_json &extra) |
no test coverage detected