| 435 | } |
| 436 | |
| 437 | std::string common_sampler_print(const struct common_sampler * gsmpl) { |
| 438 | std::string result = "logits "; |
| 439 | |
| 440 | for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { |
| 441 | const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); |
| 442 | result += std::string("-> ") + llama_sampler_name(smpl) + " "; |
| 443 | } |
| 444 | |
| 445 | return result; |
| 446 | } |
| 447 | |
| 448 | std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) { |
| 449 | n = std::min(n, (int) gsmpl->prev.size()); |
no test coverage detected