Skip to content

Commit df463b9

Browse files
author
Chris
committed
This commit updates the prompt for generating a commit message to include the diff and explain the changes in English. This allows for a more detailed and accurate commit message to be generated.
1 parent 72c1096 commit df463b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitcommit.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ 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")
2930
// Generate the commit message
30-
prompt := fmt.Sprintf("Generate a git commit message for the following changes:\n%s", diff)
31+
// prompt := fmt.Sprintf("Generate a git commit message for the following changes:\n%s", diff)
3132

3233
generatedText, err := generateCommitMessage(prompt, modelEngine, openaiAPIKey)
3334
if err != nil {

0 commit comments

Comments
 (0)