| 684 | } |
| 685 | |
| 686 | std::string common_sampler_print(const struct common_sampler * gsmpl) { |
| 687 | std::string result = "logits "; |
| 688 | |
| 689 | for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { |
| 690 | const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); |
| 691 | result += std::string("-> "); |
| 692 | result += std::string(llama_sampler_name(smpl)) + " "; |
| 693 | } |
| 694 | |
| 695 | return result; |
| 696 | } |
| 697 | |
| 698 | std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) { |
| 699 | n = std::min(n, (int) gsmpl->prev.size()); |
no test coverage detected