Prevent adding content that starts with 'x-anthropic-' to system_content. (#1436)
This commit is contained in:
parent
d83b0172b1
commit
a655a95378
|
|
@ -1202,8 +1202,11 @@ json anthropic_params_from_json(
|
|||
}
|
||||
else if (system_param.is_array()) {
|
||||
for (const auto& block : system_param) {
|
||||
if (json_value(block, "type", std::string()) == "text") {
|
||||
system_content += json_value(block, "text", std::string());
|
||||
if (json_value(block, "type", std::string()) == "text") {
|
||||
std::string content_block = json_value(block, "text", std::string());
|
||||
if (!string_starts_with(content_block, "x-anthropic-")) {
|
||||
system_content += content_block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue