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

add option to set custom openai model #154

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gianpaj
Copy link

@gianpaj gianpaj commented Jan 25, 2024

Related ISSUE

#153

Type Of Change

  • ✨ 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

Copy link

netlify bot commented Jan 25, 2024

👷 Deploy request for cz-git pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 7a72153

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jan 26, 2024

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
CleanShot.2024-01-26.at.11.36.32.mp4

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

@gianpaj gianpaj changed the title add custom openai model add option to set custom openai model Jan 28, 2024
@gianpaj
Copy link
Author

gianpaj commented Jan 28, 2024

@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
Copy link
Owner

Zhengqbbb commented Jan 30, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants