Skip to content
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

[Feature Request] OpenAI support to auto generate subject #92

Closed
Zhengqbbb opened this issue Feb 14, 2023 · 4 comments
Closed

[Feature Request] OpenAI support to auto generate subject #92

Zhengqbbb opened this issue Feb 14, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request next version Plan for next version

Comments

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Feb 14, 2023

💭 Describe the feature

Inspired by aicommits

#91


2023-2-17 update

provide command option czg --openai-token=sk- to setup token on $HOME/.config/.czrc


💡 Proposed Solution

Interaction

  1. select types and get base information
  2. generate AI commits and confirm prompt (yes or edit or retry or no)
  3. if select edit the Al commits will be default value provide original prompt message

Configuration Item

  1. useAI: Whether to enable AI auto generate subject
  2. aiType: "OpenAI"
  3. aiQuestionCB

Usage

czg:

  • if setting export CZ_OPENAI_TOKEN="xxxx" on .zshrc and .bashrc

    • provide subcmd: czg ai or git czg ai : Turn on openAI generate subject mode
    • if useAI is true just run czg or git czg
  • if none setting .zshrc or .bashrc can use:

    • CZ_OPENAI_TOKEN="xxxx" czg ai or CZ_OPENAI_TOKEN="xxxx" git czg ai
    • or use bynpx: CZ_OPENAI_TOKEN="xxxx" npx czg ai

commitizen + cz-git:

  • if setting export CZ_OPENAI_TOKEN="xxxx" on .zshrc and .bashrc

    • czai=1 cz: Turn on openAI generate subject mode
    • if useAI is true just run cz or git cz
  • if none setting .zshrc or .bashrc can use:

    • CZ_OPENAI_TOKEN="xxxx" czai=1 cz or CZ_OPENAI_TOKEN="xxxx" openai=1 git cz
@Zhengqbbb Zhengqbbb added enhancement New feature or request next version Plan for next version labels Feb 14, 2023
@Zhengqbbb Zhengqbbb self-assigned this Feb 14, 2023
@Zhengqbbb
Copy link
Owner Author

cz demo is ready. I will go on to finish czg, And I will release a next version:
a

Zhengqbbb added a commit that referenced this issue Feb 15, 2023
link #92

Co-authored-by: Zhengqbbb <1074059947@qq.com>
Zhengqbbb added a commit that referenced this issue Feb 15, 2023
…`$HOME/.config/.czrc``

link #92

Co-authored-by: Zhengqbbb <1074059947@qq.com>
@Zhengqbbb Zhengqbbb pinned this issue Feb 15, 2023
@Zhengqbbb
Copy link
Owner Author

1.4.2-beta.8 released

  • Add configure item aiNumber can let OpenAI return the specified number of subjects and open the selection !
  • And czg add command options -N=,--ai-num= Run likenpx czg@next ai -N=3

Demo:

a

@Zhengqbbb
Copy link
Owner Author

Zhengqbbb commented Feb 16, 2023

  • 2023-2-16 Update

    • Now most feature has finished
    • Next step is to to docs and website guide
    • And then will release v1.5.0
  • Next version target:(v1.6.0)

    • prompt edit feature, can use complete default subject value

@Zhengqbbb
Copy link
Owner Author

Zhengqbbb commented Feb 18, 2023

The latest version 🌟(v1.5.0)🌟 is support this issue request
More information and usage see: https://cz-git.qbb.sh/recipes/openai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next version Plan for next version
Projects
None yet
Development

No branches or pull requests

1 participant