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

[Bug]: 400 Invalid type for 'max_tokens': expected an integer, but got a string instead. #407

Closed
rogerconsul-cw opened this issue Sep 3, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@rogerconsul-cw
Copy link

rogerconsul-cw commented Sep 3, 2024

Opencommit Version

3.1.2

Node Version

22.5.1

NPM Version

10.8.2

What OS are you seeing the problem on?

Mac

What happened?

Default undefined value for OCO_TOKENS_MAX_OUTPUT is throwing error.

Expected Behavior

some default value for it.

Current Behavior

expected an integer, but got a string instead.

Possible Solution

Adjusting the default value to an integer

Steps to Reproduce

I just tried to use after updating.

Relevant log output

oco -y            
(node:13357) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
┌  open-commit
│
◇  1 staged files:
  *****
│
◇  📝 Commit message generated
│
└  ✖ 400 Invalid type for 'max_tokens': expected an integer, but got a string instead.
@rogerconsul-cw rogerconsul-cw added the bug Something isn't working label Sep 3, 2024
@jacobleft
Copy link

I get the same error after updating to 3.1.0.
Reverting to 3.0.20 works fine.

@di-sukharev
Copy link
Owner

there is a bug that will be fixed with the next release, which most likely happens today.

for now run: oco config set OCO_TOKENS_MAX_INPUT=10000 OCO_TOKENS_MAX_OUTPUT=10000, should heal it

@di-sukharev
Copy link
Owner

gonna be fixed when this is merged #408

@rogerconsul-cw
Copy link
Author

Same error. I tried to hard-code a token number before. Reverting to previous version. No worries 👍

@psjjonathan
Copy link

Same error here. Waiting for the merge.

@di-sukharev
Copy link
Owner

latest version just merged #412

run npm i -g opencommit@latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants