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

OPENAI_MAX_TOKENS validation fix #171

Conversation

jlopezlira
Copy link
Contributor

fix config validation for OPENAI_MAX_TOKENS to check if value is not NaN instead of checking if it's a number

…if value is not NaN instead of checking if it's a number
@@ -67,7 +67,7 @@ export const configValidators = {
[CONFIG_KEYS.OPENAI_MAX_TOKENS](value: any) {
validateConfig(
CONFIG_KEYS.OPENAI_MAX_TOKENS,
typeof value === 'number',
isNaN(+value),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be typeof value === 'number' && !isNaN(+value)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tnx! Can you please take a look?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was just addressed in #176, thanks

could you close the PR please if you are happy with #176

@jlopezlira jlopezlira closed this May 22, 2023
@jlopezlira jlopezlira deleted the bugfix/increase-tokens-validation-fix branch May 22, 2023 11:51
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