common : support manually triggering the reasoning budget end sequence (#23949)

This commit is contained in:
Aldehir Rojas
2026-06-01 05:37:11 -04:00
committed by GitHub
parent e22b0de60d
commit 5254a7994d
5 changed files with 108 additions and 1 deletions

View File

@@ -661,6 +661,14 @@ uint32_t common_sampler_get_seed(const struct common_sampler * gsmpl) {
return llama_sampler_get_seed(gsmpl->chain);
}
bool common_sampler_reasoning_budget_force(struct common_sampler * gsmpl) {
if (!gsmpl) {
return false;
}
return common_reasoning_budget_force(gsmpl->rbudget);
}
// helpers
llama_token_data_array * common_sampler_get_candidates(struct common_sampler * gsmpl, bool do_sort) {