Skip to content

Commit

Permalink
Update utils.hpp (openvinotoolkit#847)
Browse files Browse the repository at this point in the history
GenerationConfig, do_sample is always false, bool need be added
  • Loading branch information
pobin6 authored Sep 12, 2024
1 parent 5df42fb commit 1bceaca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/src/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ template <typename T>
void read_json_param(const nlohmann::json& data, const std::string& name, T& param) {
if (data.contains(name)) {
if constexpr (std::is_integral_v<T>) {
if (data[name].is_number_integer() || data[name].is_number_unsigned()) {
if (data[name].is_number_integer() || data[name].is_number_unsigned() || data[name].is_boolean()) {
param = data[name].get<T>();
}
} else if (data[name].type() == json_type_traits<T>::json_value_t) {
Expand Down

0 comments on commit 1bceaca

Please sign in to comment.