From ab21feb3528babbc619c0ea5bf4aa89e651340b3 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Wed, 20 Dec 2023 17:02:13 -0800 Subject: [PATCH] feat: GenAI - Added support for "models/" model name format PiperOrigin-RevId: 592693755 --- vertexai/generative_models/_generative_models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vertexai/generative_models/_generative_models.py b/vertexai/generative_models/_generative_models.py index 52e26a68be..9423b6ed20 100644 --- a/vertexai/generative_models/_generative_models.py +++ b/vertexai/generative_models/_generative_models.py @@ -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