| 595 | } |
| 596 | |
| 597 | std::string common_sampler_print(const struct common_sampler * gsmpl) { |
| 598 | std::string result = "logits "; |
| 599 | |
| 600 | for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { |
| 601 | const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); |
| 602 | result += std::string("-> "); |
| 603 | result += std::string(llama_sampler_name(smpl)) + " "; |
| 604 | } |
| 605 | |
| 606 | return result; |
| 607 | } |
| 608 | |
| 609 | std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) { |
| 610 | n = std::min(n, (int) gsmpl->prev.size()); |
no test coverage detected