Spaces:
Running
Running
Set ChatML as default chat prompt template (#985)
Browse files- src/lib/server/models.ts +5 -1
src/lib/server/models.ts
CHANGED
@@ -44,7 +44,11 @@ const modelConfig = z.object({
|
|
44 |
datasetUrl: z.string().url().optional(),
|
45 |
preprompt: z.string().default(""),
|
46 |
prepromptUrl: z.string().url().optional(),
|
47 |
-
chatPromptTemplate: z
|
|
|
|
|
|
|
|
|
48 |
promptExamples: z
|
49 |
.array(
|
50 |
z.object({
|
|
|
44 |
datasetUrl: z.string().url().optional(),
|
45 |
preprompt: z.string().default(""),
|
46 |
prepromptUrl: z.string().url().optional(),
|
47 |
+
chatPromptTemplate: z
|
48 |
+
.string()
|
49 |
+
.default(
|
50 |
+
"{{#if @root.preprompt}}<|im_start|>system\n{{@root.preprompt}}<|im_end|>\n{{/if}}{{#each messages}}{{#ifUser}}<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n{{/ifUser}}{{#ifAssistant}}{{content}}<|im_end|>\n{{/ifAssistant}}{{/each}}"
|
51 |
+
), // ChatML
|
52 |
promptExamples: z
|
53 |
.array(
|
54 |
z.object({
|