-
Notifications
You must be signed in to change notification settings - Fork 267
feat: support language for commit message generation #605
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
Conversation
I'm very sorry, I'm rewriting the integration method of OpenAI. I will reply under this PR after my modifications are completed. At that time, you can test and make new modifications.
Now, we support to configure multiple OpenAI services.
- If there's only one service available, clicking the
Use OpenAI to generate commit message
button will directly generate commit message by it. - If there're multiple services available, clicking the
Use OpenAI to generate commit message
button will show a context menu to select
image
So, you can configure multiple services (for example, one using English and another using Português) and the select the one you want when generate commit message in different repositories.
PS: You can also test different models and finally find the most suitable for you
I think your solution looks great. Perhaps an improvement could be having a per-repository setting for which pre-configured AI service I want to use. If it's set, the context menu wouldn't open, generating the message directly.
I'll sync your changes and test it on my end as well.
I think your solution looks great. Perhaps an improvement could be having a per-repository setting for which pre-configured AI service I want to use. If it's set, the context menu wouldn't open, generating the message directly.
I'll sync your changes and test it on my end as well.
At present, since there are many AI models to choose from, and they are updated relatively quickly, I am testing different models myself, such as: some are better at understanding Chinese, and some are more inclined to understand source code. I personally prefer to keep the context menu for multiple services (multiple prompts), so that there is more choice, or the opportunity to compare multiple outputs and adopt the best results.
At present, since there are many AI models to choose from, and they are updated relatively quickly, I am testing different models myself, such as: some are better at understanding Chinese, and some are more inclined to understand source code. I personally prefer to keep the context menu for multiple services (multiple prompts), so that there is more choice, or the opportunity to compare multiple outputs and adopt the best results.
I understand your point of view, and the idea of comparing results from different models before choosing the best is interesting. While this might not be as necessary when using paid models like GPT-4 or Claude 3.5, it makes more sense for those using local models like Ollama. However, it would still be beneficial to have an optional configuration per repository for those who don't need to test multiple models.
I can implement this on top of your commit later if you agree. We could even leverage the changes from this pull request.
Thanks. I agree with you that having a per-repository setting for prefered AI service. I will try to add this feature myself tomorrow.
fa13139
to
48725a7
Compare
Done.
That's great! Well done!
SourceGit_e1QzjvGHnn
@love-linger I’d like to hear your thoughts on this approach. Please let me know if you’ve considered any alternatives. I also just noticed your comment on the other pull request.