-
Notifications
You must be signed in to change notification settings - Fork 317
Add ability to set modelParams on getGenerativeModelFromCachedContent() #254
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
Conversation
…etGenerativeModelFromCachedContent()
b99065d to
2974706
Compare
dlarocque
left a comment
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.
Is the failed node integration test a flake?
| apiKey: string; | ||
| getGenerativeModel(modelParams: ModelParams, requestOptions?: RequestOptions): GenerativeModel; | ||
| getGenerativeModelFromCachedContent(cachedContent: CachedContent, requestOptions?: RequestOptions): GenerativeModel; | ||
| getGenerativeModelFromCachedContent(cachedContent: CachedContent, modelParams?: Partial<ModelParams>, requestOptions?: RequestOptions): GenerativeModel; |
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.
Why do we make this Partial<>? Is ModelParams.model only optional when it's passed to this method?
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.
None of the params are required here, and the whole object is optional, because cachedContent should have everything it needs to initialize (it always has "model").
Add a modelParams arg to getGenerativeModelFromCachedContent(), allowing users to set generationConfig and safetySettings.