From 1bf3b0f635b927f96f9e334604471bb1085faeb7 Mon Sep 17 00:00:00 2001 From: Hassan El Mghari Date: Sat, 8 Apr 2023 11:30:14 -0700 Subject: [PATCH] improved prompt to display more consise messages --- src/utils/openai.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/openai.ts b/src/utils/openai.ts index 435aa930..34a252ad 100644 --- a/src/utils/openai.ts +++ b/src/utils/openai.ts @@ -100,7 +100,7 @@ const sanitizeMessage = (message: string) => message.trim().replace(/[\n\r]/g, ' const deduplicateMessages = (array: string[]) => Array.from(new Set(array)); -const getPrompt = (locale: string, diff: string) => `Write an insightful but concise Git commit message in a complete sentence in present tense for the following diff without prefacing it with anything, the response must be in the language ${locale}:\n${diff}`; +const getPrompt = (locale: string, diff: string) => `Write a git commit message in present tense for the following diff without prefacing it with anything. Do not be needlessly verbose and make sure the answer is concise and to the point. The response must be in the language ${locale}:\n${diff}`; export const generateCommitMessage = async ( apiKey: string,