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

Closed
wants to merge 1 commit into 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 rejected.

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

@Zhengqbbb
Copy link
Owner

I have released a next pre-release version 🌟(v1.10.0-beta.1)🌟 for testing.
Plan for the official release on the weekend 🚀.

Welcome to try it out! 👀 Let me know if there are still any issues. 🎉

npm install -g czg@next
czg -v # ensure version is v1.10.0-beta.1
czg -h # show help

# Usage

### 1. Use the default `gpt-4o-mini` model
czg ai

### 2. Set specify a model in current session
czg ai -M=gpt-3.5-turbo

### 3. Setup the default model
czg --api-model="gpt-4"

See more setup details in https://deploy-preview-185--cz-git.netlify.app/recipes/openai#setup-openai-token

@gianpaj gianpaj closed this Sep 27, 2024
@gianpaj gianpaj deleted the custom-openai-model branch September 27, 2024 08:44
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.

2 participants