mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 01:05:09 +02:00
try don't trigger the magic if input is following the jinja template.exactly for thinking models (+1 squashed commits)
Squashed commits: [5542e81dc] try don't trigger the magic if input is following the jinja template.
This commit is contained in:
@@ -1076,4 +1076,14 @@ std::vector<ggml_backend_dev_t> kcpp_parse_device_list(const std::string & value
|
||||
devices.push_back(nullptr);
|
||||
}
|
||||
return devices;
|
||||
}
|
||||
|
||||
bool kcpp_string_ends_with(const std::string& str, const std::string& suffix) {
|
||||
return str.size() >= suffix.size() &&
|
||||
str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
|
||||
}
|
||||
|
||||
std::string kcpp_rstrip(const std::string& s) {
|
||||
size_t end = s.find_last_not_of(" \t\n\r\f\v");
|
||||
return (end == std::string::npos) ? "" : s.substr(0, end + 1);
|
||||
}
|
||||
Reference in New Issue
Block a user