Skip to content

Commit 7b9c225

Browse files
committed
ChatON: Check for the boolean entries in meta-json
1 parent aed6c0c commit 7b9c225

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

common/chaton.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ inline void _chaton_meta_dump(std::string &tmpl) {
9999
LOG("INFO:%s:%s:%s", __func__, "user->suffix", chaton_tmpl_role_kv(tmpl, K_USER, K_SUFFIX));
100100
LOG("INFO:%s:%s:%s", __func__, "assistant->prefix", chaton_tmpl_role_kv(tmpl, K_ASSISTANT, K_PREFIX));
101101
LOG("INFO:%s:%s:%s", __func__, "assistant->suffix", chaton_tmpl_role_kv(tmpl, K_ASSISTANT, K_SUFFIX));
102+
LOG("INFO:%s:%s:%d", __func__, K_REVERSE_PROMPT, chaton_tmpl_kv(tmpl, K_REVERSE_PROMPT));
103+
LOG("INFO:%s:%s:%d", __func__, K_SYSTEMUSER_1ST_USER_HAS_PREFIX, chaton_tmpl_kv(tmpl, K_SYSTEMUSER_1ST_USER_HAS_PREFIX));
102104
}
103105
}
104106

@@ -176,3 +178,9 @@ inline std::string chaton_tmpl_kv(const std::string &tmpl, const std::string &ke
176178
LOG_TEELN("DBUG:%s:%s:%s:%s", __func__, tmpl.c_str(), key.c_str(), got.c_str());
177179
return got;
178180
}
181+
182+
inline bool chaton_tmpl_kv_bool(const std::string &tmpl, const std::string &key) {
183+
bool got = conMeta[tmpl][key];
184+
LOG_TEELN("DBUG:%s:%s:%s:%d", __func__, tmpl.c_str(), key.c_str(), got);
185+
return got;
186+
}

0 commit comments

Comments
 (0)