diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-08-15 07:14:06 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-08-15 07:14:06 +0800 |
| commit | 511ddc6ef674fd5383fb035e1db8595724b2d3c6 (patch) | |
| tree | 253e890022269ef0fae4648d1ff58eb7eabf20bd | |
| parent | 5a86c7a637da1467c9890d31aaccdf4c428dd87d (diff) | |
| download | lex-511ddc6ef674fd5383fb035e1db8595724b2d3c6.tar.gz | |
Align two apply_template calls, improve prompt.
| -rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -12,7 +12,7 @@ #define SYSTEM_PROMPT \ "You are a dictionary assistant. Define the target word in the context provided.\n" \ "DO NOT repeat target word in definition. Choose one or two of Formality levels.\n\n" \ - "Output format:\n" \ + "FOLLOW the output format:\n" \ "<WORD> (<part of speech>) — <Formality: Conversational|Formal|Literary|Figurative|Archaic>\n\n" \ "DEFINITION:\n" \ "<terse, highly accurate definition in context>\n\n" \ @@ -50,7 +50,7 @@ static void process_request(struct llama_model *model, const char *user_prompt) if (!tmpl) fprintf(stderr, "Warning: model has no embedded chat template\n"); - prompt_len = llama_chat_apply_template(tmpl, messages, 2, true, NULL, 0); + prompt_len = llama_chat_apply_template(NULL, messages, 2, true, NULL, 0); if (prompt_len <= 0) { fprintf(stderr, "Error: failed to calculate chat template size\n"); return; |
