-
Notifications
You must be signed in to change notification settings - Fork 158
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
VertexAI connection parameters #1934
Conversation
d0f8c87
to
8c115e8
Compare
models: list[str] = dataclasses.field(default_factory=list) | ||
|
||
|
||
def get_project_from_firebase_config() -> str | None: |
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.
Should we get location from Firebase Config? As I got, it might be there as well.
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 is vertex plugin, it should not be aware of Firebase config.
|
||
credentials = options.google_auth | ||
|
||
sa_env = os.getenv(const.GCLOUD_SERVICE_ACCOUNT_CREDS) |
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.
VertexAI accepts Service Account directly. Maybe we'd better provide it?
I also expect that GCLOUD_SERVICE_ACCOUNT_CREDS contains the path to the JSON key of the Service Account. Is that so?
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.
GCLOUD_SERVICE_ACCOUNT_CREDS contains JSON blob of the service account credentials. It was added specifically to support environments where it's hard to write the credentials file.
process.env.GCLOUD_SERVICE_ACCOUNT_CREDS |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
"""Constants for VertexAI plugin.""" | ||
GCLOUD_PROJECT = 'GCLOUD_PROJECT' |
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.
GOOGLE_CLOUD_PROJECT is also reserved by Firebase. Should we read from it?
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.
let's skip GOOGLE_CLOUD_PROJECT for now. can revisit later.
@pavelgj |
8c115e8
to
333e3f7
Compare
Please use https://www.conventionalcommits.org/en/v1.0.0/ for your commit message format |
333e3f7
to
d4240d4
Compare
d4240d4
to
a2e17e1
Compare
|
||
class ModelReference(BaseModel): | ||
name: str | ||
info: ModelInfo |
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.
model reference should also contain the config
Line 545 in 90e2321
config?: z.infer<CustomOptions>; |
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.
no need to add now, could you please just add a todo?
'gemini-1.0-pro': ModelReference( | ||
name='vertexai/gemini-1.0-pro', | ||
info=ModelInfo( | ||
versions=['gemini-1.0-pro-001', 'gemini-1.0-pro-002'], |
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.
let's drop versions, we're thinking of doing that on the JS side as well
|
||
|
||
# Deprecated on 2/15/2025 | ||
SUPPORTED_V1_MODELS = { |
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.
let's drop 1.0 (already deprecated)
In PR #2014 I did the same with the new plugin API. |
ProjectId:
Location:
Credentials:
I don't see the cache (vertexClientFactoryCache in JS version) in initializer of VertexAI.
I doubt if we need credentials. If we have a GCLOUD_SERVICE_ACCOUNT_CREDS, it might be more logical to provide the service account itself to the VertexAI.