cz-git icon indicating copy to clipboard operation
cz-git copied to clipboard

add option to set custom openai model

Open gianpaj opened this issue 1 year ago • 4 comments

Related ISSUE

https://github.com/Zhengqbbb/cz-git/issues/153

Type Of Change

  • [x] ✨ New feature (non-breaking change which adds functionality)

How do I test this? I tried to build but now I don't know how to run cz-git or czg ai

gianpaj avatar Jan 25 '24 19:01 gianpaj

Deploy request for cz-git pending review.

Visit the deploys page to approve it

Name Link
Latest commit 7a72153ee74e2b39b5883f42a523c86953fe721c

netlify[bot] avatar Jan 25 '24 19:01 netlify[bot]

How do I test this? I tried to build but now I don't know how to run cz-git or czg ai

  1. Run command
pnpm build
# or
pnpm dev
  1. Run command to debug or test result
  • cz-git just plugin turn on the option useAI. Then run commitizen's cz command
  • czg you can use pnpm x or pnpm czg to run exec czg exec file

https://github.com/Zhengqbbb/cz-git/assets/40693636/1d3eaa69-3a15-4ddc-84b9-37ef2031b760


If you ready just tell me. I will release a npm pre-verison-package 😉

Zhengqbbb avatar Jan 26 '24 03:01 Zhengqbbb

@Zhengqbbb thanks for the video!

Can you check my last commit and debug it, please? I have the model set, but it still doesn't work

$ cat ~/.config/.czrc
{"openAIToken":"sk-xxx","openAIModel":"gpt-4-1106-preview"}
$ pnpm x ai -a czg

> [email protected] x /Users/gianpaj/tmp/cz-git
> czg "ai" "-a" "czg"

[email protected]

? Select the type of change that you're committing: feat:     A new feature
ℹ Generating your AI commit subject...
{ aiModel: undefined }

gianpaj avatar Jan 28 '24 07:01 gianpaj

Can you check my last commit and debut it, please? I have the model setting in, but still doesn't work

- {"openAIToken":"sk-xxx","openAIModel":"gpt-4-1106-preview"}
+ {"openAIToken":"sk-xxx","aiModel":"gpt-4-1106-preview"}

CleanShot 2024-01-30 at 14 33 14@2x

Zhengqbbb avatar Jan 30 '24 06:01 Zhengqbbb