mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-04 12:01:13 +02:00
common: add json.h abstraction (#27511)
* add common/json * migrate common * adapt jinja * migrate server * big wip * migrate tests * wip * revert some excessive changes * wip * wip 2 * revert redundant changes * fix server crash * various fixes * fix ci * harden a bit * clean up * rm json-shim * add some comments * rm redundant decl
This commit is contained in:
@@ -1540,7 +1540,7 @@ std::vector<llama_token_data> get_token_probabilities(llama_context * ctx, int i
|
||||
}
|
||||
|
||||
std::string safe_json_to_str(const json & data) {
|
||||
return data.dump(-1, ' ', false, json::error_handler_t::replace);
|
||||
return data.dump_safe();
|
||||
}
|
||||
|
||||
// TODO: reuse llama_detokenize
|
||||
|
||||
Reference in New Issue
Block a user