|
@@ -219,6 +219,10 @@ int main(int argc, char ** argv) {
|
|
|
// print chat template example in conversation mode
|
|
// print chat template example in conversation mode
|
|
|
if (params.conversation_mode) {
|
|
if (params.conversation_mode) {
|
|
|
if (params.enable_chat_template) {
|
|
if (params.enable_chat_template) {
|
|
|
|
|
+ if (!params.prompt.empty()) {
|
|
|
|
|
+ LOG_WRN("*** User-specified prompt in conversation mode will be ignored, did you mean to set --system-prompt (-sys) instead?\n");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
LOG_INF("%s: chat template example:\n%s\n", __func__, common_chat_format_example(chat_templates.get(), params.use_jinja).c_str());
|
|
LOG_INF("%s: chat template example:\n%s\n", __func__, common_chat_format_example(chat_templates.get(), params.use_jinja).c_str());
|
|
|
} else {
|
|
} else {
|
|
|
LOG_INF("%s: in-suffix/prefix is specified, chat template will be disabled\n", __func__);
|
|
LOG_INF("%s: in-suffix/prefix is specified, chat template will be disabled\n", __func__);
|
|
@@ -276,7 +280,7 @@ int main(int argc, char ** argv) {
|
|
|
{
|
|
{
|
|
|
auto prompt = (params.conversation_mode && params.enable_chat_template)
|
|
auto prompt = (params.conversation_mode && params.enable_chat_template)
|
|
|
// format the system prompt in conversation mode (fallback to default if empty)
|
|
// format the system prompt in conversation mode (fallback to default if empty)
|
|
|
- ? chat_add_and_format("system", params.prompt.empty() ? DEFAULT_SYSTEM_MESSAGE : params.prompt)
|
|
|
|
|
|
|
+ ? chat_add_and_format("system", params.system_prompt.empty() ? DEFAULT_SYSTEM_MESSAGE : params.system_prompt)
|
|
|
// otherwise use the prompt as is
|
|
// otherwise use the prompt as is
|
|
|
: params.prompt;
|
|
: params.prompt;
|
|
|
if (params.interactive_first || !params.prompt.empty() || session_tokens.empty()) {
|
|
if (params.interactive_first || !params.prompt.empty() || session_tokens.empty()) {
|