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

[Feature Request] Ability to select a OpenAI model #153

Open gianpaj opened 7 months ago

gianpaj commented 7 months ago

💭 Describe the feature

I think the default one is hardcoded to gpt-3.5-turbo https://github.com/Zhengqbbb/cz-git/blob/b091c64cdfb3fa38d7ee4fdeefff1a03b024e4fb/packages/cz-git/src/generator/api.ts#L87

💡 Proposed Solution

Be able to set the AI model in the czg command line e.g.

czg --ai-model=gpt-4-1106-preview

https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo

gianpaj commented 7 months ago

Related but not the same as https://github.com/Zhengqbbb/cz-git/pull/102

As you can't specify the exact model.

GPT-4 turbo (gpt-4-1106-preview) is 66% cheaper than GPT-4 (gpt-4)

image

gpt-3.5-turbo-1106 costs $0.0010 / 1K tokens

But gpt-4-1106-preview is 1000% more expensive than gpt-3.5-turbo-1106 😬💰

https://openai.com/pricing

Zhengqbbb commented 7 months ago

Unfortunately, my openai api key has expired, and I can't renewal it, so the feature may not be landed in time.

Sure ~ PR Welcome 😉