-
Notifications
You must be signed in to change notification settings - Fork 189
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 frequencePenalty and presencePenalty parameters support for gener… #264
Conversation
types/requests.ts
Outdated
presencePenalty?: number | ||
// Frequency penalty applied to the next token's logprobs, multiplied by the | ||
// number of times each token has been seen in the respponse so far. | ||
frequencePenalty?: number |
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.
spelling: "frequency" - probably need to search/replace
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.
Looking pretty good, a couple comments.
types/requests.ts
Outdated
@@ -31,6 +31,12 @@ import { | |||
export interface BaseParams { | |||
safetySettings?: SafetySetting[]; | |||
generationConfig?: GenerationConfig; | |||
// Presence penalty applied to the next token's logprobs if the token has |
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.
In order to show up in the documentation, comments need to be in block format, e.g.
/**
* Presence penalty applied to the next token's logprobs if the token has
* already been seen in the response.
*/
For reference: https://api-extractor.com/pages/tsdoc/doc_comment_syntax/
.changeset/cyan-pants-move.md
Outdated
"@google/generative-ai": minor | ||
--- | ||
|
||
Add frequencePenalty and presencePenalty parameters support for generate content. |
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.
This will show up as a release note in the public changelog so we try to do our best to format it for public consumption. You can use backticks to format code literals and symbols. Suggestion:
Add `frequencyPenalty` and `presencePenalty` parameters support for `generateContent()`.
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.
LGTM! Thanks for adding doc comments for the new parameters, the old ones don't really have any, this will be helpful.
…ate content.