ChatON:Control SystemMsgSuffix+End tags only wrt 1st system msg
Make it similar to user-begin+prefix control. ie only wrt 1st msg of respective type.
This commit is contained in:
parent
3fcaf19967
commit
6e13c0c87e
1 changed files with 8 additions and 3 deletions
|
@ -578,6 +578,7 @@ inline bool chaton_tmpl_apply_ex(
|
|||
}
|
||||
cp.add_part(ChatParts::N, content);
|
||||
if (role == K_SYSTEM) {
|
||||
if (cntSystem == 1) {
|
||||
if (chaton_tmpl_getkey_bool(tmpl, K_SYSTEMUSER_SYSTEM_HAS_SUFFIX)) {
|
||||
cp.add_part(ChatParts::S, suffix);
|
||||
}
|
||||
|
@ -588,6 +589,10 @@ inline bool chaton_tmpl_apply_ex(
|
|||
cp.add_part(ChatParts::S, suffix);
|
||||
cp.add_part(ChatParts::S, end);
|
||||
}
|
||||
} else {
|
||||
cp.add_part(ChatParts::S, suffix);
|
||||
cp.add_part(ChatParts::S, end);
|
||||
}
|
||||
}
|
||||
if (alertAssistantAtEnd) {
|
||||
auto assistantBeginPrefix = chaton_tmpl_role_getkeys(tmpl, K_ASSISTANT, {K_BEGIN, K_PREFIX});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue