Saat melakukan inisialisasi layanan Vertex AI, Anda dapat secara opsional menentukan
lokasi untuk menjalankan layanan dan mengakses model. Jika Anda tidak menentukan
lokasi, defaultnya adalah us-central1
. Lihat daftar
lokasi yang tersedia nanti di halaman ini.
Contoh kode
Perhatikan bahwa contoh ini menunjukkan akses ke model Gemini, tetapi Anda juga dapat menentukan lokasi saat mengakses model Imagen 3.
import FirebaseVertexAI
// Initialize the Vertex AI service
// Optionally specify a location in which to run the service and access the model
let vertex = VertexAI.vertexAI(location: "LOCATION ")
// Initialize the generative model with a model that supports your use case
let model = vertex.generativeModel(modelName: "MODEL_NAME ")
Lokasi yang tersedia
Google Cloud menggunakan region untuk menentukan API regional. Google Cloud hanya menyimpan data pelanggan di region yang Anda tentukan untuk semua fitur AI Generatif yang tersedia secara umum di Vertex AI.
AI Generatif di Vertex AI tersedia di wilayah berikut. Beberapa model dan/atau versi tertentu mungkin hanya tersedia di lokasi tertentu (untuk mengetahui ketersediaan lokasi secara mendetail, lihat dokumentasi Google Cloud).
- Columbus, Ohio (
us-east5
) - Dallas, Texas (
us-south1
) - Iowa (
us-central1
) - Las Vegas, Nevada (
us-west4
) - Moncks Corner, South Carolina (
us-east1
) - Northern Virginia (
us-east4
) - Oregon (
us-west1
)
- Montréal (
northamerica-northeast1
)
- Sao Paulo, Brasil (
southamerica-east1
)
- Belgia (
europe-west1
) - Finlandia (
europe-north1
) - Frankfurt, Jerman (
europe-west3
) - London, Inggris Raya (
europe-west2
) - Madrid, Spanyol (
europe-southwest1
) - Milan, Italia (
europe-west8
) - Belanda (
europe-west4
) - Paris, Prancis (
europe-west9
) - Warsaw, Polandia (
europe-central2
) - Zürich, Swiss (
europe-west6
)
- Changhua County, Taiwan (
asia-east1
) - Hong Kong, China (
asia-east2
) - Mumbai, India (
asia-south1
) - Seoul, Korea (
asia-northeast3
) - Singapura (
asia-southeast1
) - Sydney, Australia (
australia-southeast1
) - Tokyo, Jepang (
asia-northeast1
)
- Dammam, Arab Saudi (
me-central2
) - Doha, Qatar (
me-central1
) - Tel Aviv, Israel (
me-west1
)