Skip to content

Commit aa66db1

Browse files
committed
Server:Switch ChatON chat msg taggings only if chaton-template-id
Instead of letting compile time decide between old chat templating logic and the newer experimental chaton templating logic, now use of --chaton-template-id cmdline argument enables the switching to chaton based chat messages templating. Also dont forget --chaton-meta-json to set the meta json file, for use by the chaton templating logic.
1 parent 160062c commit aa66db1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/server/server.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2957,6 +2957,7 @@ int main(int argc, char ** argv) {
29572957
exit(2);
29582958
}
29592959
sparams.chat_template = params.chaton_template_id;
2960+
bOldChatTemplate = false;
29602961
}
29612962

29622963
std::unique_ptr<httplib::Server> svr;

examples/server/utils.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
using json = nlohmann::ordered_json;
1717

18-
const bool bOldChatTemplate = false;
18+
bool bOldChatTemplate = true;
1919

2020
// https://community.openai.com/t/openai-chat-list-of-error-codes-and-types/357791/11
2121
enum error_type {

0 commit comments

Comments
 (0)