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.13k stars 41 forks source link

[v1.10.0 version plan]: Add more AI model and support choose AI model #180

Closed Zhengqbbb closed 1 month ago

Zhengqbbb commented 3 months ago

πŸ’­ Describe the feature

ISSUE Links: #153 #154 #156


1. Support more AI models

Current models:

Planned additions:


2. Deprecate and support backward compatibility for the old configuration option aiType

- aiType: 
+ aiModel: 'gpt-3.5-turbo' | 'gpt-4' | 'gpt-4o' | 'gpt-4o-mini' ...

3. CLI add options -M=|--ai-model= and --api-model=

-M=|--model=          Sets the AI model
--api-model=          Setup request OpenAI model   to local (.config/.czrc)

[!NOTE]
If the configuration in the global or project contains the aiModel field, then the ~/.config/.czrc set by --api-model will be overridden.
Priority: -M=|--model= > global or project configure - aiModel > ~/.config/.czrc - apiModel

terranc commented 2 months ago

ε€ͺιœ€θ¦θΏ™εŠŸθƒ½ε‘’

ZedRover commented 2 months ago

cy

Zhengqbbb commented 1 month ago

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

Zhengqbbb commented 1 month ago

The latest version 🌟(v1.10.0)🌟 should be resolve this issue request document information: