-
Notifications
You must be signed in to change notification settings - Fork 924
VinF Hybrid Inference #1: Update the API #8874
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
base: vertexai-hybridinference-integration
Are you sure you want to change the base?
VinF Hybrid Inference #1: Update the API #8874
Conversation
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
Vertex AI Mock Responses Check
|
@@ -3,7 +3,8 @@ | |||
"strict": true, | |||
"outDir": "dist", | |||
"lib": [ | |||
"ESNext" | |||
"ESNext", | |||
"dom" |
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 is this file changed?
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.
Without this, adding the @types/dom-chromium-ai dependency causes the postsubmit script to fail. I'll try reproing the issue on a stand-alone branch.
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.
Created PR #8916 to repro in CI env.
@@ -213,3 +213,28 @@ export interface FunctionCallingConfig { | |||
mode?: FunctionCallingMode; | |||
allowedFunctionNames?: string[]; | |||
} | |||
|
|||
/** | |||
* Toggles hybrid inference. |
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.
Could you add the @public
tag here and in other JSDoc comments for public APIs?
/** | ||
* Defines the name of the default in-cloud model to use for hybrid inference. | ||
*/ | ||
static DEFAULT_HYBRID_IN_CLOUD_MODEL = 'gemini-2.0-flash-lite'; |
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.
Could we avoid defining a default model? If this model string is deprecated in the future, and a user is using an old version of the SDK, would using this default result in an error?
This change updates the getGenerativeModel getter to accept
ModelParams
orHybridParams
. TheHybridParams.mode
field indicates whether hybrid inference is intended.This change just updates the inputs. All existing tests pass, so the diff should be relatively easy to understand. The next change will use the inputs.