di-sukharev / opencommit

Generate conventional git commit messages with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.98k stars 318 forks source link

[Bug]: Unsupported config key OCO_OPENAI_API_KEY: Must be 51 characters long #326

Closed PMassicotte closed 3 weeks ago

PMassicotte commented 5 months ago

Opencommit Version

1.0.2

Node Version

18.20.2

NPM Version

10.5.0

What OS are you seeing the problem on?

Other Linux Distro

What happened?

openai pushing to use project based keys which are longer than the 51 characters expected by opencommit

image

Expected Behavior

Able to use the new key format

Current Behavior

Unsupported config key OCO_OPENAI_API_KEY: Must be 51 characters long

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

di-sukharev commented 5 months ago

true, looks like new openai tokens can now be larger than 51 chars, we should get rid of the 51 length validation, any volunteers for a PR? should be a 1 liner, will look into it on the weekend myself if no PR is opened earlier

PMassicotte commented 5 months ago

Looks like another PR was merged, I will close mine.

di-sukharev commented 5 months ago

pls keep it opened before new version is published

di-sukharev commented 3 weeks ago

update the latest version just merged https://github.com/di-sukharev/opencommit/pull/412

run npm i -g opencommit@latest