Skip to content

Commit 58688a1

Browse files
bump
1 parent fe2bd09 commit 58688a1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import prompts from "prompts";
88
import { program } from "commander";
99

1010
let openai;
11-
let model = "gpt-3.5-turbo-1106"; // Default model
11+
let model = "gpt-4-turbo-preview"; // Default model
1212

1313
export async function getGitSummary() {
1414
try {
@@ -42,12 +42,14 @@ const gptCommit = async () => {
4242

4343
const messages = [
4444
{role: "system", content: "You are a helpful assistant."},
45-
{role: "user", content: `Generate a Git commit message based on the following summary. That do not wrap in single or double quarts.: ${gitSummary}`}
45+
{role: "user", content: `Generate a Git commit message based on the following summary: ${gitSummary}\n\nCommit message: `}
4646
];
4747

4848
const parameters = {
4949
model,
5050
messages,
51+
n:1,
52+
temperature: 0,
5153
max_tokens: 50,
5254
};
5355

@@ -63,7 +65,7 @@ const gptCommit = async () => {
6365
});
6466

6567
if (confirm.value) {
66-
execSync(`git commit -m "${message.replace(/"/g, '\\"')}"`);
68+
execSync(`git commit -m "${message.replace(/"/g, '\\"')}"`); // escape double quart
6769
console.log("Committed with the suggested message.");
6870
} else {
6971
console.log("Commit canceled.");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@laststance/git-gpt-commit",
3-
"version": "0.7.0-beta06",
3+
"version": "0.7.0-beta07",
44
"description": "An AI-powered Git extension that generates commit messages using OpenAI's GPT-3, streamlining the commit process and improving developer productivity.",
55
"main": "index.js",
66
"type": "module",

0 commit comments

Comments
 (0)