Skip to content

Commit

Permalink
improved prompt to display more consise messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutlope committed Apr 8, 2023
1 parent 42a2a39 commit 1bf3b0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1bf3b0f

Please sign in to comment.