تحديد الموقع الجغرافي للوصول إلى النموذج

يتم عرض نماذج الذكاء الاصطناعي التوليدي من Google باستخدام نقاط نهاية إقليمية محدّدة.

عند بدء خدمة Vertex AI، يمكنك اختياريًا تحديد الموقع الجغرافي لنقطة النهاية للنموذج الذي تُدخله في طلباتك. إذا لم تحدِّد موقعًا جغرافيًا، سيكون الخيار التلقائي هو us-central1. يمكنك الاطّلاع على قائمة المواقع الجغرافية المتاحة لاحقًا في هذه الصفحة.

لا تتيح Vertex AI in Firebase حتى الآن استخدام نقطة النهاية الشاملة لقياس أثر Vertex AI.

عيّنات تعليمات برمجية

تجدر الإشارة إلى أنّ هذه العيّنات تعرض الوصول إلى نموذج Gemini، ولكن يمكنك أيضًا تحديد الموقع الجغرافي عند الوصول إلى نموذج Imagen 3.

استبدِل LOCATION برمز الموقع الجغرافي (مثلاً، europe-west4) من قائمة المواقع الجغرافية المتاحة في وقت لاحق من هذه الصفحة.

Swift

import FirebaseVertexAI

// Initialize the Vertex AI service
// Specify the endpoint location for the model accessed by your requests
let vertex = VertexAI.vertexAI(location: "LOCATION")

// Create a `GenerativeModel` instance with a model that supports your use case
let model = vertex.generativeModel(modelName: "MODEL_NAME")

Kotlin

// Initialize the Vertex AI service
// Specify the endpoint location for the model accessed by your requests
val vertexAI = Firebase.vertexAI(location = "LOCATION")

// Create a `GenerativeModel` instance with a model that supports your use case
val generativeModel = vertexAI.generativeModel(modelName = "MODEL_NAME")

Java

// Initialize the Vertex AI service
// Specify the endpoint location for the model accessed by your requests
FirebaseVertexAI vertexAI = FirebaseVertexAI.getInstance("LOCATION");

// Create a `GenerativeModel` instance with a model that supports your use case
GenerativeModel gm = vertexAI.generativeModel("MODEL_NAME");

// Use the `GenerativeModelFutures` Java compatibility layer which offers
// support for `ListenableFuture` and Publisher APIs
GenerativeModelFutures model = GenerativeModelFutures.from(gm);

Web

import { initializeApp } from "firebase/app";
import { getVertexAI, getGenerativeModel } from "firebase/vertexai";

// TODO(developer) Replace the following with your app's Firebase configuration
// See: https://firebase.google.com/docs/web/learn-more#config-object
const firebaseConfig = {
  // ...
};

// Initialize FirebaseApp
const firebaseApp = initializeApp(firebaseConfig);

// Initialize the Vertex AI service
// Specify the endpoint location for the model accessed by your requests
const vertexAI = getVertexAI(firebaseApp, { location: 'LOCATION' });

// Create a `GenerativeModel` instance with a model that supports your use case
const model = getGenerativeModel(vertexAI, { model: 'MODEL_NAME' });

Dart

import 'package:firebase_vertexai/firebase_vertexai.dart';
import 'package:firebase_core/firebase_core.dart';

// Initialize FirebaseApp
await Firebase.initializeApp();

// Initialize the Vertex AI service
// Specify the endpoint location for the model accessed by your requests
final vertexAI = await FirebaseVertexAI.instanceFor(location: 'LOCATION');

// Create a `GenerativeModel` instance with a model that supports your use case
final model = vertexAI.generativeModel(model: 'MODEL_NAME');

المواقع الجغرافية التي تتوفّر فيها الميزة

يستخدم Google Cloud المناطق لتحديد نقاط النهاية على مستوى منطقة معيّنة. لا تخزِّن Google Cloud بيانات العملاء إلا في المنطقة التي تحدّدها لجميع الميزات المتاحة بشكل عام ل الذكاء الاصطناعي التوليدي على Vertex AI.

تتوفّر ميزة "الذكاء الاصطناعي التوليدي" على Vertex AI في المناطق التالية. قد لا تتوفّر بعض الطُرز و/أو إصدارات معيّنة في بعض المواقع الجغرافية (لمعرفة مدى التوفّر التفصيلي في المواقع الجغرافية، يُرجى الاطّلاع على مستندات Google Cloud).

الولايات المتحدة

  • كولومبوس، أوهايو (us-east5)
  • دالاس، تكساس (us-south1)
  • أيوا (us-central1)
  • لاس فيغاس، نيفادا (us-west4)
  • مونكس كورنر، كارولاينا الجنوبية (us-east1)
  • فرجينيا الشمالية (us-east4)
  • أوريغون (us-west1)

كندا

  • مونتريال (northamerica-northeast1)

أميركا الجنوبية

  • ساو باولو، البرازيل (southamerica-east1)

أوروبا

  • بلجيكا (europe-west1)
  • فنلندا (europe-north1)
  • فرانكفورت، ألمانيا (europe-west3)
  • لندن، المملكة المتحدة (europe-west2)
  • مدريد، إسبانيا (europe-southwest1)
  • ميلانو، إيطاليا (europe-west8)
  • هولندا (europe-west4)
  • باريس، فرنسا (europe-west9)
  • وارسو، بولندا (europe-central2)
  • زيورخ، سويسرا (europe-west6)

آسيا والمحيط الهادئ

  • مقاطعة تشانغوا، تايوان (asia-east1)
  • هونغ كونغ، الصين (asia-east2)
  • مومباي، الهند (asia-south1)
  • سول، كوريا (asia-northeast3)
  • سنغافورة (asia-southeast1)
  • سيدني، أستراليا (australia-southeast1)
  • طوكيو، اليابان (asia-northeast1)

الشرق الأوسط

  • الدمام، المملكة العربية السعودية (me-central2)
  • الدوحة، قطر (me-central1)
  • تل أبيب، إسرائيل (me-west1)