Start a new conversation and choose “Gemini Pro 2.5” as your model
✨ You can now prompt it as you would any chat model:
code
You: Summarize the latest trends in renewable energy.
Gemini Pro 2.5: …
3. Calling Gemini Pro 2.5 via Vertex AI
A) gcloud CLI
bash
# Replace PROJECT_ID and ENDPOINT_ID with your own
gcloud ai endpoints predict \
--project=PROJECT_ID \
--region=us-central1 \
--endpoint=ENDPOINT_ID \
--json-request='{
"instances": [
{"content": "Translate to French: How are you today?"}
],
"parameters": {"temperature": 0.2}
}'
B) Python SDK
python
from google.cloud import aiplatform
# 1) Initialize
aiplatform.init(
project="YOUR_PROJECT_ID",
location="us-central1"
)
# 2) Reference the preview model
model = aiplatform.Model(
"projects/YOUR_PROJECT_ID/locations/us-central1/models/gemini-pro-2.5-preview"
)
# 3) Predict
response = model.predict(
instances=[{"content": "List three healthy dinner recipes."}],
parameters={"temperature": 0.3}
)
print(response.predictions)
System messages: Pass a “system” message first to steer style/role:
json
{"role":"system","content":"You are a friendly assistant."}
Temperature & Max Output: Tweak temperature (0–1) for creativity and maxOutputTokens for length.
Batching: Send up to 8 instances in one call for cost efficiency.
Safety: Be mindful of preview-level limitations; read the release notes for known issues.
❓ Need a deeper dive (prompts, streaming, embeddings)? Let me know how you’d like to integrate Gemini Pro 2.5—happy to share code samples or best practices!