| 497 | } |
| 498 | |
| 499 | struct llama_sampler * llama_sampler_chain_get(const struct llama_sampler * chain, int32_t i) { |
| 500 | const auto * p = (const llama_sampler_chain *) chain->ctx; |
| 501 | |
| 502 | if (i < 0 || (size_t) i >= p->samplers.size()) { |
| 503 | return nullptr; |
| 504 | } |
| 505 | |
| 506 | return p->samplers[i]; |
| 507 | } |
| 508 | |
| 509 | struct llama_sampler * llama_sampler_chain_remove(struct llama_sampler * chain, int32_t i) { |
| 510 | auto * p = (llama_sampler_chain *) chain->ctx; |
no test coverage detected