Skip to content

Commit

Permalink
feat: GenAI - Added support for "models/<model ID>" model name format
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 592693755
  • Loading branch information
Ark-kun authored and copybara-github committed Dec 21, 2023
1 parent c033c59 commit ab21feb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vertexai/generative_models/_generative_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def __init__(
"""
if "/" not in model_name:
model_name = "publishers/google/models/" + model_name
if model_name.startswith("models/"):
model_name = "publishers/google/" + model_name

project = aiplatform_initializer.global_config.project
location = aiplatform_initializer.global_config.location
Expand Down

0 comments on commit ab21feb

Please sign in to comment.