...
CREATE OR REPLACE MODEL `your-project-id.TESTYOUR_GEMINIDATASET.gemini_remote_model`
REMOTE WITH CONNECTION `your-project-id.useurope-central1west1.vertex-ai-connection`
OPTIONS (
ENDPOINT = 'gemini-12.50-flash' -- or 'gemini-1.5-pro' for more advanced model
);
Test Model Connection
-- Test the model with a simple query
SELECT ml_generate_text_llm_result
FROM ML.GENERATE_TEXT(
MODEL `your-project-id.TEST_GEMINI.gemini_remote_model`,
(SELECT "Test connection to Gemini AI" AS prompt),
STRUCT(TRUE AS flatten_json_output)
);
...