-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add custom Vertex AI Model Garden example #2868
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: main
Are you sure you want to change the base?
Conversation
@@ -108,6 +108,39 @@ agent = Agent(model) | |||
... | |||
``` | |||
|
|||
#### Customizing Model | |||
|
|||
You can access models from the Model Garden, including but not limited to Gemini, available under your GCP project using one of the following `model_name` patterns: `{model_id}`, `publishers/{publisher}/models/{model_id}`, or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model_id}`. |
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.
You can access models from the Model Garden, including but not limited to Gemini, available under your GCP project using one of the following `model_name` patterns: `{model_id}`, `publishers/{publisher}/models/{model_id}`, or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model_id}`. | |
You can access models from the [Model Garden](https://cloud.google.com/model-garden?hl=en) that are available under your GCP project, including but not limited to Gemini, using one of the following `model_name` patterns: `{model_id}`, `publishers/{publisher}/models/{model_id}`, or `projects/{project}/locations/{location}/publishers/{publisher}/models/{model_id}`. |
location=location, | ||
project=project, | ||
credentials=credentials | ||
) |
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 a custom client needed in this case?
We should be able to use GoogleProvider(credentials=credentials, project=project, location=location, vertexai=True)
) | ||
provider = GoogleProvider(client=client) | ||
model = GoogleModel( | ||
f'projects/{project}/locations/{location}/publishers/meta/models/llama-3.3-70b-instruct-maas', |
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.
Would just publishers/meta/models/llama-3.3-70b-instruct-maas
work as the project and location have already been configured?
This PR adds an example of how to use models besides Gemini from the Vertex AI Model Garden.