Zhengqbbb / cz-git

cz-git | czg 🛠️ DX first and more engineered, lightweight, customizable, standard output format Commitizen adapter and CLI
https://cz-git.qbb.sh
MIT License
1.05k stars 39 forks source link

add option to set custom openai model #154

Open gianpaj opened 7 months ago

gianpaj commented 7 months ago

Related ISSUE

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

Type Of Change

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

netlify[bot] commented 7 months ago

Deploy request for cz-git rejected.

Name Link
Latest commit 7a72153ee74e2b39b5883f42a523c86953fe721c
Zhengqbbb commented 7 months ago

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
  2. Run command to debug or test result

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 😉

gianpaj commented 7 months ago

@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

> cz-git@1.8.0 x /Users/gianpaj/tmp/cz-git
> czg "ai" "-a" "czg"

czg@1.8.0

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

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