From e0543756b3732fbf50f71bc1b1828f60ec1ee9e4 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Mon, 26 Jun 2023 14:31:49 -0400 Subject: [PATCH] move prompt template to server --- desktop/src/app.tsx | 6 +----- model_prompts.json | 5 ++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/desktop/src/app.tsx b/desktop/src/app.tsx index 0c39c86a..ebe74c24 100644 --- a/desktop/src/app.tsx +++ b/desktop/src/app.tsx @@ -14,11 +14,7 @@ async function completion(prompt: string, callback: (res: string) => void) { 'Content-Type': 'application/json', }, body: JSON.stringify({ - prompt: `A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions. - - ### Human: Hello, Assistant. - ### Assistant: Hello. How may I help you today? - ### Human: ${prompt}`, + prompt: prompt, model: 'ggml-model-q4_0', }), }) diff --git a/model_prompts.json b/model_prompts.json index f6195395..3d1e7287 100644 --- a/model_prompts.json +++ b/model_prompts.json @@ -1,5 +1,6 @@ { "alpaca": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:\n\n", + "ggml": "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.\n\n### Human: Hello, Assistant.\n### Assistant: Hello. How may I help you today?\n### Human: ${prompt}", "gpt4": "### Instruction:\n{prompt}\n\n### Response:\n", "hermes": "### Instruction:\n{prompt}\n\n### Response:\n", "oasst": "{prompt}", @@ -7,7 +8,5 @@ "qlora": "### Human: {prompt}\n### Assistant:", "tulu": "\n{prompt}\n\n(include newline)", "vicuna": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n\nUSER: {prompt}\nASSISTANT:", - "wizardlm-13b": "{prompt}\n\n### Response:", - "wizardlm-30b": "{prompt}\n\n### Response:", - "wizardlm-7b": "{prompt}\n\n### Response:" + "wizardlm": "{prompt}\n\n### Response:" } \ No newline at end of file