-
Notifications
You must be signed in to change notification settings - Fork 662
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
Add model parameters to restrict max tokens #22
Conversation
node-zerox/src/index.ts
Outdated
const invalidKeys = Object.keys(params).filter( | ||
(key) => !validKeys.includes(key) | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should check if the value is correct type of number. Right now, it seems I can pass in i.e. topP: [], which causes OpenAI to throw an error. What are your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to validate the type of the value as well, then either manually validate (switch case) or Zod. Without Zod basically have to do type gymnastics manually.
…ntent-length-param
Add model parameters to restrict max tokens
No description provided.