Skip to content

Commit df01955

Browse files
committed
Update metadata description
1 parent 6fb7355 commit df01955

10 files changed

+31
-76
lines changed

.github/settings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
22

33
repository:
4-
description: A git prepare-commit-msg hook for authoring commit messages with GPT-3.
5-
topics: git rust cli githook large-language-models gpt3 commit-message
4+
description: A git prepare-commit-msg hook for authoring commit messages with OpenAI.
5+
topics: git rust cli githook large-language-models commit-message
66
has_issues: true
77
has_projects: false
88
has_wiki: false

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![crates.io downloads](https://img.shields.io/crates/d/gptcommit.svg)](https://crates.io/crates/gptcommit)
99
[![Rust dependency status](https://deps.rs/repo/github/zurawiki/gptcommit/status.svg)](https://deps.rs/repo/github/zurawiki/gptcommit)
1010

11-
A git prepare-commit-msg hook for authoring commit messages with GPT-3. With this tool, you can easily generate clear, comprehensive and descriptive commit messages letting you focus on writing code.
11+
A git prepare-commit-msg hook for authoring commit messages with an OpenAI language model. With this tool, you can easily generate clear, comprehensive and descriptive commit messages letting you focus on writing code.
1212

1313
See [announcement blog post](https://zura.wiki/post/never-write-a-commit-message-again-with-the-help-of-gpt-3/).
1414

@@ -40,7 +40,7 @@ gptcommit install
4040

4141
To use `gptcommit`, simply run `git commit` as you normally would. The hook will automatically generate a commit message for you using a large language model like GPT. If you're not satisfied with the generated message, you can always edit it before committing.
4242

43-
Note: By default, `gptcommit` uses the GPT-3 model. Please ensure you have sufficient credits in your OpenAI account to use it.
43+
Note: By default, `gptcommit` uses the fastest and most cost-effective OpenAI model available. Please ensure you have sufficient credits in your OpenAI account to use it.
4444

4545
## Features
4646

@@ -91,10 +91,10 @@ To maintain compatibility with other OpenAI clients, we support the `OPENAI_API_
9191

9292
### Try out a different OpenAI model
9393

94-
`gptcommit` uses `text-davinci-003` by default. The model can be configured to use other models as below
94+
`gptcommit` uses a cost-effective default model. The model can be configured to use other models as below
9595

9696
```sh
97-
gptcommit config set openai.model text-davinci-002
97+
gptcommit config set openai.model your-model-name
9898
```
9999

100100
You can also config this setting via the `GPTCOMMIT__OPENAI__MODEL`.

package/winget/zurawiki.gptcommit.locale.en-US.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PackageName: gptcommit
99
PackageUrl: https://github.com/zurawiki/gptcommit
1010
License: MIT
1111
LicenseUrl: https://github.com/zurawiki/gptcommit/blob/main/LICENSE
12-
ShortDescription: A git prepare-commit-msg hook for authoring commit messages with GPT-3
12+
ShortDescription: A git prepare-commit-msg hook for authoring commit messages with OpenAI
1313
Tags:
1414
- "console"
1515
- "command-line"

prompts/conventional_commit.tera

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
You are an expert programmer summarizing a code change.
2-
You went over every file that was changed in it.
3-
For some of these files changes where too big and were omitted in the files diff summary.
4-
Determine the best label for the commit.
1+
You are an expert programmer determining the best conventional commit label for the following change.
52

6-
Here are the labels you can choose from:
3+
Choose one of the following labels:
74

85
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
96
- chore: Updating libraries, copyrights or other repo setting, includes updating dependencies.
@@ -22,4 +19,4 @@ THE FILE SUMMARIES:
2219
{{ summary_points }}
2320
###
2421

25-
The label best describing this change:
22+
Respond with only the label best describing this change:

prompts/summarize_commit.tera

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
You are an expert programmer writing a commit message.
2-
You went over every file that was changed in it.
3-
For some of these files changes where too big and were omitted in the files diff summary.
4-
Please summarize the commit.
5-
Write your response in bullet points, using the imperative tense.
6-
Starting each bullet point with a `-`.
7-
Write a high level description. Do not repeat the commit summaries or the file summaries.
8-
Write the most important bullet points. The list should not be more than a few bullet points.
1+
You are an expert programmer writing a concise commit summary.
2+
Summarize the overall change in a handful of short bullet points.
3+
Use the imperative mood and begin each bullet with `-`.
4+
Focus on high level actions, avoiding repetition of file summaries.
5+
Return no more than five bullet points.
96

107
THE FILE SUMMARIES:
118
```
129
{{ summary_points }}
1310
```
1411

15-
Remember to write only the most important points and do not write more than a few bullet points.
1612

1713
THE COMMIT MESSAGE:

prompts/summarize_file_diff.tera

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,9 @@
1-
You are an expert programmer summarizing a git diff.
2-
Reminders about the git diff format:
3-
For every file, there are a few metadata lines, like (for example):
4-
```
5-
diff --git a/lib/index.js b/lib/index.js
6-
index aadf691..bfef603 100644
7-
--- a/lib/index.js
8-
+++ b/lib/index.js
9-
```
10-
This means that `lib/index.js` was modified in this commit. Note that this is only an example.
11-
Then there is a specifier of the lines that were modified.
12-
A line starting with `+` means it was added.
13-
A line that starting with `-` means that line was deleted.
14-
A line that starts with neither `+` nor `-` is code given for context and better understanding.
15-
It is not part of the diff.
16-
After the git diff of the first file, there will be an empty line, and then the git diff of the next file.
17-
18-
Do not include the file name as another part of the comment.
19-
Do not use the characters `[` or `]` in the summary.
20-
Write every summary comment in a new line.
21-
Comments should be in a bullet point list, each line starting with a `-`.
22-
The summary should not include comments copied from the code.
23-
The output should be easily readable. When in doubt, write fewer comments and not more. Do not output comments that
24-
simply repeat the contents of the file.
25-
Readability is top priority. Write only the most important comments about the diff.
26-
27-
EXAMPLE SUMMARY COMMENTS:
28-
```
29-
- Raise the amount of returned recordings from `10` to `100`
30-
- Fix a typo in the github action name
31-
- Move the `octokit` initialization to a separate file
32-
- Add an OpenAI API for completions
33-
- Lower numeric tolerance for test files
34-
- Add 2 tests for the inclusive string split function
35-
```
36-
Most commits will have less comments than this examples list.
37-
The last comment does not include the file names,
38-
because there were more than two relevant files in the hypothetical commit.
39-
Do not include parts of the example in your summary.
40-
It is given only as an example of appropriate comments.
41-
1+
You are an expert programmer summarizing the following git diff.
2+
Produce concise bullet points describing the key changes.
3+
List at most five points for brevity.
4+
Use the imperative mood and start each line with `-`.
5+
Exclude file names, diff markers and code snippets.
6+
Keep the summary short and easy to read.
427

438
THE GIT DIFF TO BE SUMMARIZED:
449
```

prompts/title_commit.tera

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
You are an expert programmer writing a commit message title.
2-
You went over every file that was changed in it.
3-
Some of these files changes were too big, and were omitted in the summaries below.
4-
Please summarize the commit into a single specific and cohesive theme.
5-
Write your response using the imperative tense following the kernel git commit style guide.
6-
Write a high level title.
7-
Do not repeat the commit summaries or the file summaries.
8-
Do not list individual changes in the title.
1+
You are an expert programmer generating a concise commit title.
2+
Summarize the change in a single short sentence using the imperative mood.
3+
Ignore file names and diff details.
94

105
EXAMPLE SUMMARY COMMENTS:
116
```
@@ -20,5 +15,6 @@ THE FILE SUMMARIES:
2015
{{ summary_points }}
2116
```
2217

23-
Remember to write only one line, no more than 50 characters.
18+
Write only one line, no more than 50 characters.
19+
Respond with just the title text.
2420
THE COMMIT MESSAGE TITLE:

src/settings.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ use crate::{
2222
},
2323
};
2424

25-
static DEFAULT_OPENAI_MODEL: &str = "gpt-3.5-turbo-16k";
25+
// Use the fastest and cheapest model available by default
26+
static DEFAULT_OPENAI_MODEL: &str = "gpt-4.1-nano";
2627

2728
static DEFAULT_FILES_TO_IGNORE: &[&str; 8] = &[
2829
"bun.lockb",

tests/e2e/test_config_list_get_set.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gptcommit config list
66
gptcommit config keys
77

88
gptcommit config get openai.model
9-
# assert default = text-davinci-003
9+
# assert default = gpt-4.1-nano
1010
gptcommit config set openai.model foo
1111
gptcommit config get openai.model
1212
# assert is foo

tests/e2e/test_config_local_list_get_set.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export TEMPDIR=$(mktemp -d)
1010
# assert is valid TOML
1111

1212
gptcommit config get openai.model
13-
# assert default = text-davinci-003
13+
# assert default = gpt-4.1-nano
1414
gptcommit config set --local openai.model foo
1515
gptcommit config set openai.model bar
1616
gptcommit config get openai.model
@@ -34,7 +34,7 @@ export TEMPDIR=$(mktemp -d)
3434
# assert is valid TOML
3535

3636
gptcommit config get openai.model
37-
# assert default = text-davinci-003
37+
# assert default = gpt-4.1-nano
3838
set +e
3939
gptcommit config set --local openai.model foo
4040
# TODO assert output

0 commit comments

Comments
 (0)