-
Notifications
You must be signed in to change notification settings - Fork 179
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 ability to set modelParams on getGenerativeModelFromCachedContent() #254
Conversation
…etGenerativeModelFromCachedContent()
b99065d
to
2974706
Compare
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?
@@ -481,7 +481,7 @@ export class GoogleGenerativeAI { | |||
// (undocumented) | |||
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.