Grounding dengan
Grounding dengan
- Meningkatkan akurasi faktual: Mengurangi halusinasi model dengan mendasarkan respons pada database Google yang berisi lebih dari 250 juta tempat dan bisnis di dunia nyata.
- Mengakses informasi real-time: Menjawab pertanyaan menggunakan data live, seperti jam buka bisnis saat ini dan status real-time stasiun pengisian daya kendaraan listrik.
- Memberikan konteks visual: Membangun kepercayaan pengguna dengan mengintegrasikan widget peta interaktif, foto, dan Street View langsung bersama klaim berbasis lokasi model.
Model yang didukung
gemini-3.1-pro-previewgemini-3-flash-previewgemini-3.1-flash-litegemini-2.5-progemini-2.5-flashgemini-2.5-flash-lite
Bahasa yang didukung
Lihat bahasa yang didukung untuk model Gemini.
Melakukan grounding model dengan Google Maps
|
Klik penyedia Gemini API Anda untuk melihat konten khusus penyedia dan kode di halaman ini. |
Saat membuat instance GenerativeModel, berikan GoogleMaps sebagai tool yang dapat digunakan model untuk membuat responsnya.
Swift
import FirebaseAILogic
// Initialize the Gemini Developer API backend service
let ai = FirebaseAI.firebaseAI(backend: .googleAI())
// Example: Coordinates for New York City
let latAndLong = CLLocationCoordinate2D(latitude: 40.7128, longitude: -74.0060)
// (Optional) Define a RetrievalConfig to configure the Grounding with Google Maps tool.
// You can optionally provide a location's coordinates and/or a language code
// for more relevant and personalized Google Maps results.
let retrievalConfig = RetrievalConfig(
location: latAndLong,
// Example: Language code for English (US)
languageCode: "en_US"
)
// Wrap the RetrievalConfig inside a ToolConfig.
let toolConfig = ToolConfig(retrievalConfig: retrievalConfig)
// Create a `GenerativeModel` instance with a model that supports your use case.
let model = ai.generativeModel(
modelName: "GEMINI_MODEL_NAME",
// Provide Google Maps as a tool that the model can use to generate its response.
tools: [Tool.googleMaps()],
// Add the configuration for the Grounding with Google Maps tool
// (if this optional config was defined above).
toolConfig: toolConfig
)
let response = try await model.generateContent("restaurants near me?")
print(response.text ?? "No text in response.")
// Make sure to comply with the "Grounding with Google Maps " usage requirements,
// which includes how you meet service usage requirements
Kotlin
// (Optional) Define a RetrievalConfig to configure the Grounding with Google Maps tool.
// You can optionally provide a location's coordinates and/or a language code
// for more relevant and personalized Google Maps results.
val retrievalConfig = RetrievalConfig(
// Example: Coordinates for New York City
latLng = LatLng(latitude = 40.7128, longitude = -74.0060),
// Example: Language code for English (US)
languageCode = "en_US"
)
// Wrap the RetrievalConfig inside a ToolConfig.
val toolConfig = ToolConfig(
retrievalConfig = retrievalConfig
)
// Initialize the Gemini Developer API backend service
// Create a `GenerativeModel` instance with a model that supports your use case.
val model = Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
modelName = "GEMINI_MODEL_NAME",
// Add the configuration for the Grounding with Google Maps tool
// (if this optional config was defined above).
toolConfig = toolConfig,
// Provide Google Maps as a tool that the model can use to generate its response.
tools = listOf(Tool.googleMaps())
)
val response = model.generateContent("restaurants near me?")
print(response.text)
// Make sure to comply with the "Grounding with Google Maps " usage requirements,
// which includes how you meet service usage requirements
Java
// (Optional) Define a ToolConfig to configure the Grounding with Google Maps tool.
// You can optionally provide a location's coordinates and/or a language code
// for more relevant and personalized Google Maps results.
ToolConfig toolConfig = new ToolConfig(
null,
new RetrievalConfig(
// Example: Coordinates for New York City
new LatLng(40.7128, -74.0060),
// Example: Language code for English (US)
"en_US"
)
);
// Initialize the Gemini Developer API backend service.
// Create a `GenerativeModel` instance with a model that supports your use case.
GenerativeModel ai = FirebaseAI.getInstance(GenerativeBackend.googleAI())
.generativeModel("GEMINI_MODEL_NAME",
null,
null,
// Provide Google Maps as a tool that the model can use to generate its response.
List.of(Tool.googleMaps()),
// Add the configuration for the Grounding with Google Maps tool
// (if this optional config was defined above).
toolConfig);
// Use the GenerativeModelFutures Java compatibility layer which offers
// support for ListenableFuture and Publisher APIs.
GenerativeModelFutures model = GenerativeModelFutures.from(ai);
ListenableFuture response = model.generateContent("restaurants near me?");
Futures.addCallback(response, new FutureCallback() {
@Override
public void onSuccess(GenerateContentResponse result) {
String resultText = result.getText();
System.out.println(resultText);
}
@Override
public void onFailure(Throwable t) {
t.printStackTrace();
}
}, executor);
// Make sure to comply with the "Grounding with Google Maps " usage requirements,
// which includes how you meet service usage requirements
Web
import { initializeApp } from "firebase/app";
import { getAI, getGenerativeModel, GoogleAIBackend } from "firebase/ai";
// 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 Gemini Developer API backend service
const ai = getAI(firebaseApp, { backend: new GoogleAIBackend() });
// (Optional) Define a toolConfig to configure the Grounding with Google Maps tool.
// You can optionally provide a location's coordinates and/or a language code
// for more relevant and personalized Google Maps results.
const toolConfig = {
retrievalConfig: {
// Example: Coordinates for New York City
latLng: {
latitude: 40.7128,
longitude: -74.0060
},
// Example: Language code for English (US)
languageCode: 'en-US'
}
};
// Create a `GenerativeModel` instance with a model that supports your use case
const model = getGenerativeModel(
ai,
{
model: "GEMINI_MODEL_NAME",
// Provide Google Maps as a tool that the model can use to generate its response.
// (Optional) Set `enableWidget` to control whether the response contains a `googleMapsWidgetContextToken`.
tools: [ { googleMaps: { enableWidget: true } } ],
// Add the configuration for the Grounding with Google Maps tool
// (if this optional config was defined above).
toolConfig
}
);
const result = await model.generateContent("restaurants near me?");
console.log(result.response.text());
// Make sure to comply with the "Grounding with Google Maps " usage requirements,
// which includes how you meet service usage requirements
Dart
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_ai/firebase_ai.dart';
import 'firebase_options.dart';
// Initialize FirebaseApp.
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
// (Optional) Define a ToolConfig to configure the Grounding with Google Maps tool.
// You can optionally provide a location's coordinates and/or a language code
// for more relevant and personalized Google Maps results.
final toolConfig = ToolConfig(
retrievalConfig: RetrievalConfig(
// Example: Coordinates for New York City
latLng: LatLng(latitude: 40.712728, longitude: -74.006015),
// Example: Language code for English (US)
languageCode: 'en',
),
);
// Initialize the Gemini Developer API backend service
// Create a `GenerativeModel` instance with a model that supports your use case.
final model = FirebaseAI.googleAI().generativeModel(
model: 'GEMINI_MODEL_NAME',
// Provide Google Maps as a tool that the model can use to generate its response.
tools: [
Tool.googleMaps(),
],
// Add the configuration for the Grounding with Google Maps tool
// (if this optional config was defined above).
toolConfig: toolConfig,
);
final response = await model.generateContent([Content.text("restaurants near me?")]);
print(response.text);
// Make sure to comply with the "Grounding with Google Maps " usage requirements,
// which includes how you meet service usage requirements
Unity
using Firebase;
using Firebase.AI;
// Initialize the Gemini Developer API backend service
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.GoogleAI());
// Example: Coordinates for New York City
var latLng = new LatLng(40.7128, -74.0060);
// (Optional) Define a RetrievalConfig to configure the Grounding with Google Maps tool.
// You can optionally provide a location's coordinates and/or a language code
// for more relevant and personalized Google Maps results.
var retrievalConfig = new RetrievalConfig(latLng, languageCode: "en");
// Wrap the RetrievalConfig inside a ToolConfig.
var toolConfig = new ToolConfig(retrievalConfig: retrievalConfig);
// Create a `GenerativeModel` instance with a model that supports your use case
var model = ai.GetGenerativeModel(
modelName: "GEMINI_MODEL_NAME",
// Provide Google Maps as a tool that the model can use to generate its response.
tools: new[] { new Tool(new GoogleMaps()) },
// Add the configuration for the Grounding with Google Maps tool
// (if this optional config was defined above).
toolConfig: toolConfig
);
var response = await model.GenerateContentAsync("restaurants near me?");
UnityEngine.Debug.Log(response.Text ?? "No text in response.");
// Make sure to comply with the "Grounding with Google Maps " usage requirements,
// which includes how you meet service usage requirements
Pelajari cara memilih model yang sesuai untuk kasus penggunaan dan aplikasi Anda.
Untuk hasil yang ideal, gunakan temperatur 1.0 (yang merupakan default untuk semua model Gemini 2.5 dan yang lebih baru). Pelajari cara menetapkan temperatur dalam konfigurasi model.
Praktik terbaik dan tips untuk meningkatkan hasil
Bagian ini menjelaskan beberapa praktik terbaik umum untuk menggunakan Grounding dengan
Praktik terbaik umum
Hanya berikan alat jika diperlukan: Untuk mengoptimalkan performa dan biaya, berikan akses model ke alat Grounding dengan
Google Maps hanya jika kasus penggunaan memiliki konteks geografis yang jelas.Berikan lokasi pengguna: Untuk respons yang paling relevan dan dipersonalisasi (dan saat lokasi pengguna diketahui), sertakan lokasi pengguna (menggunakan lintang dan bujur melalui
latLng) dalam konfigurasi alat Grounding denganGoogle Maps .Beri tahu pengguna akhir: Beri tahu pengguna akhir Anda dengan jelas bahwa data
Google Maps digunakan untuk menjawab kueri mereka. Memberikan sumber kepada pengguna akhir dariGoogle Maps adalah persyaratan penggunaan layanan untuk alat Grounding denganGoogle Maps .(Hanya Web SDK) Render widget kontekstual
Google Maps : Widget kontekstual dirender menggunakan token konteks,googleMapsWidgetContextToken, yang ditampilkan dalam respons Gemini API dan dapat digunakan untuk merender konten visual dariGoogle Maps . Untuk mengetahui informasi selengkapnya tentang widget kontekstual, lihat Grounding denganGoogle Maps widget dalam dokumentasi.Google Maps
Menggunakan properti tempat dalam perintah
Bagian ini mencantumkan properti tempat yang digunakan untuk mendeskripsikan lokasi
dan digunakan oleh Grounding dengan
Contoh properti tempat
Daftar ini menyediakan contoh properti tentang tempat yang diurutkan berdasarkan abjad yang dapat digunakan oleh model Anda untuk membuat respons.
- Alamat
- Ambil di tepi jalan
- Kartu debit
- Jarak
- Tempat parkir gratis
- Musik live
- Menu untuk anak-anak
- Jam buka
- Opsi pembayaran (seperti tunai atau kartu kredit)
- Jawaban terkait tempat
- Aman untuk hewan peliharaan
- Menyajikan bir
- Menyajikan makanan vegetarian
- Dapat diakses pengguna kursi roda
- Wi-Fi
Jawaban terkait tempat adalah respons dari Grounding dengan
Contoh perintah yang menggunakan properti tempat
Contoh berikut menggunakan
properti tempat
dalam perintah tentang berbagai jenis tempat. Grounding with
Merencanakan makan malam keluarga: Menentukan apakah restoran cocok untuk keluarga dan apakah restoran tersebut menawarkan layanan yang praktis.
- Contoh perintah: Apakah "The Italian Place" bagus untuk anak-anak, dan apakah mereka menawarkan layanan pesan antar? Berapa ratingnya?
Memeriksa aksesibilitas untuk teman: Menentukan apakah lokasi memenuhi kebutuhan aksesibilitas tertentu.
- Contoh perintah: Saya memerlukan restoran yang memiliki pintu masuk yang dapat diakses pengguna kursi roda.
Menemukan lokasi untuk camilan larut malam: Menemukan tempat yang buka dan menyajikan makanan tertentu pada waktu tertentu.
- Contoh perintah: Apakah "Burger Joint" buka sekarang? Apakah mereka menyajikan makan malam? Jam berapa mereka buka pada hari Jumat?
Bertemu klien untuk minum kopi: Menilai kesesuaian kafe untuk pertemuan bisnis berdasarkan fasilitas, penawaran, dan opsi pembayaran.
- Contoh perintah: Apakah "Cafe Central" memiliki Wi-Fi? Apakah mereka menyajikan kopi? Berapa tingkat harga mereka, dan apakah mereka menerima kartu kredit?
Perhatikan bahwa informasi dalam
Cara kerja Grounding dengan Google Maps
Saat Anda memberikan alat GoogleMaps kepada model, model akan menangani seluruh alur kerja penelusuran, pemrosesan, dan kutipan informasi secara otomatis.
Berikut adalah alur kerja model:
Menerima perintah: Aplikasi Anda mengirimkan perintah ke model Gemini dengan alat
GoogleMapsyang diaktifkan.Menganalisis perintah: Model menganalisis perintah dan menentukan apakah
Google Maps dapat meningkatkan responsnya, misalnya, jika perintah berisi konteks geografis (seperti "kedai kopi di dekat saya", "museum di San Francisco").Memanggil alat: Model, yang mengenali maksud geografis, memanggil alat Grounding dengan
Google Maps .Mengirim kueri ke
Google Maps : Layanan Grounding denganGoogle Maps mengirimkan kueri keGoogle Maps untuk mendapatkan informasi yang relevan (misalnya, tempat, ulasan, foto, alamat, jam buka).Anda dapat secara opsional menyertakan lintang dan bujur dalam konfigurasi alat (atau bahkan hanya dalam perintah secara langsung) untuk mendapatkan hasil yang lebih relevan dan dipersonalisasi
Google Maps Alat ini adalah alat penelusuran teks dan berperilaku mirip dengan penelusuran diGoogle Maps , yang mana kueri lokal ("di dekat saya") akan menggunakan koordinat, sedangkan kueri tertentu atau non-lokal kemungkinan tidak akan terpengaruh oleh lokasi eksplisit.Memproses hasil
Google Maps : Model memproses hasilGoogle Maps dan merumuskan respons terhadap perintah asli.Menampilkan
Google Maps Hasil Grounding: Model menampilkan respons akhir yang mudah digunakan dan didasarkan pada hasilGoogle Maps . Respons ini menyertakan:- Jawaban teks model.
- Objek
groundingMetadatadengan hasilGoogle Maps dan sumber. - (Hanya Web SDK) Secara opsional, googleMapsWidgetContextToken yang memungkinkan Anda
merender widget
Google Maps kontekstual di aplikasi untuk interaksi visual. Untuk mengetahui informasi selengkapnya tentang widget kontekstual, lihat Grounding denganGoogle Maps widget dalam dokumentasi.Google Maps
Perhatikan bahwa menyediakan groundingMetadata sehingga
itu bukan merupakan
Memahami hasil grounding
Jika model mendasarkan responsnya pada groundingMetadata yang berisi data terstruktur yang
penting untuk memverifikasi klaim dan membangun pengalaman sumber yang kaya di
aplikasi Anda.
Objek groundingMetadata dalam
groundingChunks: Array objek yang berisi sumbermaps(uri,placeId, dantitle).groundingSupports: Array potongan untuk menghubungkantextrespons model ke sumber digroundingChunks. Setiap potongan menautkansegmentteks (yang ditentukan olehstartIndexdanendIndex) ke satu atau beberapagroundingChunkIndices. Kolom ini membantu Anda membuat link sumber inline. Pelajari cara memenuhi persyaratan penggunaan layanan nanti di halaman ini.- (Hanya Web SDK)
googleMapsWidgetContextToken: Token teks yang dapat digunakan untuk merender widget Tempat kontekstual. Kolom ini hanya ditampilkan saat menggunakan Web SDK dan jika Anda telah menetapkan parameterenableWidgetketrue.
Berikut adalah contoh respons yang menyertakan objek groundingMetadata:
{
"candidates": [
{
"content": {
"parts": [
{
"text": "CanteenM is an American restaurant with..."
}
],
"role": "model"
},
"groundingMetadata": {
"groundingChunks": [
{
"maps": {
"uri": "https://maps.google.com/?cid=13100894621228039586",
"title": "Heaven on 7th Marketplace",
"placeId": "places/ChIJ0-zA1vBZwokRon0fGj-6z7U"
}
}
],
"groundingSupports": [
{
"segment": {
"startIndex": 0,
"endIndex": 79,
"text": "CanteenM is an American restaurant with a 4.6-star rating and is open 24 hours."
},
"groundingChunkIndices": [0]
}
],
"googleMapsWidgetContextToken": "widgetcontent/..."
}
}
]
}
Persyaratan penggunaan layanan
Bagian ini menjelaskan persyaratan penggunaan layanan untuk Grounding dengan
Memberi tahu pengguna tentang sumber Google Maps
Dengan setiap groundingChunks yang mendukung setiap respons. Metadata berikut juga ditampilkan:
- URI sumber
- Judul
- ID
Di aplikasi Anda, saat menampilkan hasil dari Grounding dengan
Sumber
Google Maps harus segera mengikuti konten yang dihasilkan yang didukung oleh sumber tersebut. Konten yang dihasilkan ini juga disebut sebagaiGoogle Maps Hasil Grounding.Sumber
Google Maps harus dapat dilihat dalam satu interaksi pengguna.
Berikut cara mendapatkan nilai untuk menampilkan sumber dari
Swift
// ...
// Get the model's response
let text = response.text
// Get the grounding metadata
if let candidate = response.candidates.first,
let groundingMetadata = candidate.groundingMetadata {
// Get sources
let groundingChunks = groundingMetadata.groundingChunks
for chunk in groundingChunks {
if let maps = chunk.maps {
let title = maps.title // for example, "Heaven on 7th Marketplace"
let url = maps.url // for example, "https://maps.google.com/?cid=13100894621228039586"
let placeId = maps.placeId // for example, "places/ChIJ0-zA1vBZwokRon0fGj-6z7U"
// TODO(developer): show source in the UI
}
}
}
Kotlin
// ...
// Get the model's response
val text = response.text
// Get the grounding metadata
val groundingMetadata = response.candidates.firstOrNull()?.groundingMetadata
// Get sources
val groundingChunks = groundingMetadata?.groundingChunks
groundingChunks?.let { chunks ->
for (chunk in chunks) {
val title = chunk.maps?.title // for example, "Heaven on 7th Marketplace"
val uri = chunk.maps?.uri // for example, "https://maps.google.com/?cid=13100894621228039586"
val placeId = chunk.maps?.placeId // for example, "places/ChIJ0-zA1vBZwokRon0fGj-6z7U"
// TODO(developer): show source in the UI
}
}
Java
// ...
Futures.addCallback(response, new FutureCallback() {
@Override
public void onSuccess(GenerateContentResponse result) {
// Get the model's response
String text = result.getText();
// Get the grounding metadata
GroundingMetadata groundingMetadata =
result.getCandidates()[0].getGroundingMetadata();
if (groundingMetadata != null) {
// Get sources
List chunks = groundingMetadata.getGroundingChunks();
if (chunks != null) {
for(GroundingChunk chunk : chunks) {
GoogleMapsGroundingChunk maps = chunk.getMaps();
if (maps != null) {
String title = maps.getTitle(); // for example, "Heaven on 7th Marketplace"
String uri = maps.getUri(); // for example, "https://maps.google.com/?cid=13100894621228039586"
String placeId = maps.getPlaceId(); // for example, "places/ChIJ0-zA1vBZwokRon0fGj-6z7U"
// TODO(developer): show sources in the UI
}
}
}
}
}
@Override
public void onFailure(Throwable t) {
t.printStackTrace();
}
}, executor);
Web
// ...
// Get the model's text response
const text = result.response.text();
// Get the grounding metadata
const groundingMetadata = result.response.candidates?.[0]?.groundingMetadata;
// Get sources
const groundingChunks = groundingMetadata?.groundingChunks;
if (groundingChunks) {
for (const chunk of groundingChunks) {
const title = chunk.maps?.title; // for example, "Heaven on 7th Marketplace"
const uri = chunk.maps?.uri; // for example, "https://maps.google.com/?cid=13100894621228039586"
const placeId = chunk.maps?.placeId; // for example, "places/ChIJ0-zA1vBZwokRon0fGj-6z7U"
// TODO(developer): show sources in the UI
}
}
Dart
// ...
// Get the model's response
final text = response.text;
// Get the grounding metadata
final groundingMetadata = response.candidates.first.groundingMetadata;
// Get sources
final groundingChunks = groundingMetadata?.groundingChunks;
if (groundingChunks != null) {
for (var chunk in groundingChunks) {
final title = chunk.maps?.title; // for example, "Heaven on 7th Marketplace"
final uri = chunk.maps?.uri; // for example, "https://maps.google.com/?cid=13100894621228039586"
final placeId = chunk.maps?.placeId; // for example, "places/ChIJ0-zA1vBZwokRon0fGj-6z7U"
// TODO(developer): show sources in the UI
}
}
Unity
// ...
// Get the model's response
var text = response.Text;
// Get the grounding metadata
var groundingMetadata = response.Candidates.First().GroundingMetadata;
// Get sources
if (groundingMetadata != null) {
foreach(GroundingChunk chunk in groundingMetadata?.GroundingChunks) {
if (chunk.Maps != null) {
var title = chunk.Maps?.Title; // for example, "Heaven on 7th Marketplace"
var uri = chunk.Maps?.Uri; // for example, "https://maps.google.com/?cid=13100894621228039586"
var placeId = chunk.Maps?.PlaceId; // for example, "places/ChIJ0-zA1vBZwokRon0fGj-6z7U"
// TODO(developer): show sources in the UI
}
}
}
Menampilkan sumber Google Maps dengan link Google Maps
Untuk setiap sumber di groundingChunks, pratinjau link harus dibuat dengan mengikuti persyaratan berikut:
- Atribusikan setiap sumber ke
Google Maps dengan mengikutiGoogle Maps panduan atribusi teks. - Tampilkan judul sumber yang diberikan dalam respons.
- Tautkan ke sumber menggunakan
uridari respons.
Anda dapat menciutkan tampilan sumber.
Secara opsional, Anda dapat meningkatkan pratinjau link dengan konten tambahan, seperti:
- Favicon yang disisipkan sebelum atribusi teks.
Google Maps Google Maps - Foto dari URL sumber (
og:image).
Untuk mengetahui informasi selengkapnya tentang beberapa penyedia data
Google Maps panduan atribusi teks
Saat Anda mengatribusikan sumber ke
Jangan ubah teks
Google Mapsdengan cara apa pun:- Jangan ubah kapitalisasi teks
Google Maps. - Jangan gabungkan teks
Google Mapske beberapa baris. - Jangan lokalkan teks
Google Mapske bahasa lain. - Cegah browser menerjemahkan teks
Google Mapsdengan menggunakan atribut HTMLtranslate="no".
- Jangan ubah kapitalisasi teks
Gaya teks
Google Mapsseperti yang dijelaskan dalam tabel berikut:Properti Gaya Jenis font Roboto. Memuat font bersifat opsional. Jenis font pengganti Font isi sans serif apa pun yang sudah digunakan di produk Anda atau "Sans-Serif" untuk memanggil font sistem default Gaya font Normal Ketebalan font 400 Warna font Putih, hitam (#1F1F1F), atau abu-abu (#5E5E5E). Pertahankan kontras yang dapat diakses (4,5:1) dengan latar belakang. Ukuran font Ukuran font minimum: 12sp
Ukuran font maksimum: 16sp
Untuk mempelajari sp, lihat Unit ukuran font di situs Material Design.Spasi Normal
CSS Contoh
CSS berikut merender teks Google Maps dengan gaya dan warna tipografi yang sesuai di latar belakang putih atau terang.
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
.GMP-attribution {
font-family: Roboto, Sans-Serif;
font-style: normal;
font-weight: 400;
font-size: 1rem;
letter-spacing: normal;
white-space: nowrap;
color: #5e5e5e;
}
Caching token konteks dan ID tempat
_Hasil Grounding_
- (Hanya Web SDK)
googleMapsWidgetContextToken placeId
Batasan terhadap caching dalam Persyaratan Grounding dengan Google Maps tidak berlaku untuk data ini.
Aktivitas dan wilayah yang dilarang
Grounding dengan
Anda tidak akan menggunakan Grounding dengan
Google Maps untuk aktivitas berisiko tinggi termasuk layanan respons darurat.Anda tidak akan mendistribusikan atau memasarkan aplikasi yang menawarkan Grounding dengan
Google Maps di Wilayah yang Dilarang. Untuk mengetahui informasi selengkapnya, lihat Wilayah yang Dilarang Google Maps Platform. Daftar Wilayah yang Dilarang dapat diperbarui dari waktu ke waktu.
Hasil grounding dan pemantauan AI di Firebase console
Jika Anda telah mengaktifkan pemantauan AI di Firebase konsol, respons akan disimpan di Cloud Logging. Secara default, data ini memiliki periode retensi 30 hari.
Anda bertanggung jawab untuk memastikan bahwa periode retensi ini, atau periode kustom yang Anda tetapkan, sepenuhnya selaras dengan kasus penggunaan spesifik Anda dan persyaratan kepatuhan tambahan untuk penyedia Gemini API yang Anda pilih: Gemini Developer API atau Vertex AI Gemini API (lihat Persyaratan Layanan bagian dalam Persyaratan Khusus Layanan). Anda mungkin perlu menyesuaikan periode retensi di Cloud Logging untuk memenuhi persyaratan ini.
Harga dan batas kapasitas
Harga Grounding dengan
Pastikan untuk meninjau detail tentang harga, ketersediaan model, dan batas untuk
Grounding dengan