-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use new gpt-3.5-turbo model #123
Conversation
…ChatCompletionResponse instead of CreateCompletionRequest and CreateCompletionResponse
This works well for me and seems to write better commit messages :-) |
Working pretty well for me! I also made a slight change to the prompt: |
src/utils/openai.ts
Outdated
@@ -94,7 +98,7 @@ export const generateCommitMessage = async ( | |||
|
|||
return deduplicateMessages( | |||
completion.choices | |||
.map(choice => sanitizeMessage(choice.text!)), | |||
.map(choice => sanitizeMessage(choice.message?.content ?? 'No Commit Message')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should throw an error instead of falling back to a made up commit message.
const encoder = encodingForModel(model); | ||
const model = 'gpt-3.5-turbo'; | ||
// TODO: update for the new gpt-3.5 model | ||
const encoder = encodingForModel('text-davinci-003'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was waiting for the new one to be released but I guess there's no point in blocking the feature.
Thanks! |
the tokenizer that was just added doesnt have support for the new model yet, so still using the told model and 🤞 they are very similar.
I used it to generate its own commit message.