Skip to content

Commit 9868a49

Browse files
author
Chris
committed
This commit updates the prompt for the generateCommitMessage function to better explain the purpose of the function. The prompt now asks the user to write a commit message in English without mentioning code or files, and to explain why the changes were made.
1 parent df463b9 commit 9868a49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitcommit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func main() {
2626
}
2727

2828
for {
29-
prompt:= fmt.Sprintf("Read the following git diff \n%s and write 1-2 sentences commit message in %s without mentioning lines or files. Explain why these changes were made (summarize the reasoning):\n", diff, "english")
3029
// Generate the commit message
30+
prompt:= fmt.Sprintf("Read the following git diff \n%s and write a commit message in %s without mentioning code or files. Explain why these changes were made (summarize the reasoning):\n", diff, "english")
3131
// prompt := fmt.Sprintf("Generate a git commit message for the following changes:\n%s", diff)
3232

3333
generatedText, err := generateCommitMessage(prompt, modelEngine, openaiAPIKey)

0 commit comments

Comments
 (0)