fix chat parser not been used in anthropic api (#1437)

This commit is contained in:
hksdpc255 2026-03-16 18:59:01 +11:00 committed by GitHub
parent a655a95378
commit 18a9b4c125
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -1566,6 +1566,9 @@ json anthropic_params_from_json(
for (const auto& stop : chat_params.additional_stops) {
llama_params["stop"].push_back(stop);
}
if (!chat_params.parser.empty()) {
llama_params["chat_parser"] = chat_params.parser;
}
// Handle "n" field
int n_choices = json_value(body, "n", 1);