From 2f215b262d4da5273c9e466e3bcca2115b97e7b5 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Thu, 16 Feb 2023 02:52:09 -0500 Subject: [PATCH] refactor: gpt-3 prompt to be more concise (#57) --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 0715f82..95cca29 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -60,7 +60,7 @@ export const getStagedDiff = async () => { export const getDetectedMessage = (files: string[]) => `Detected ${files.length.toLocaleString()} staged file${files.length > 1 ? 's' : ''}`; -const promptTemplate = 'I want you to act like a git commit message writer. I will input a git diff and your job is to convert it into a useful commit message. Do not preface the commit with anything, use the present tense, return a complete sentence, and do not repeat yourself:'; +const promptTemplate = 'Write an insightful but concise Git commit message in a complete sentence in present tense for the following diff without prefacing it with anything:'; export const generateCommitMessage = async ( apiKey: string,