यूआरएल कॉन्टेक्स्ट टूल की मदद से, मॉडल को यूआरएल के फ़ॉर्म में अतिरिक्त कॉन्टेक्स्ट दिया जा सकता है. मॉडल, उन यूआरएल से कॉन्टेंट ऐक्सेस करके, अपने जवाब को बेहतर बना सकता है और उसमें जानकारी जोड़ सकता है.
यूआरएल कॉन्टेक्स्ट के ये फ़ायदे हैं:
डेटा इकट्ठा करना: किसी लेख या एक से ज़्यादा यूआरएल से, कीमत, नाम या अहम नतीजों जैसी खास जानकारी इकट्ठा करना.
जानकारी की तुलना करना: अलग-अलग रिपोर्ट, लेख या PDF का विश्लेषण करके उनमें अंतर की पहचान करना और रुझानों को ट्रैक करना.
कॉन्टेंट को एक साथ जोड़कर नया कॉन्टेंट बनाना: सटीक सारांश, ब्लॉग पोस्ट, रिपोर्ट या टेस्ट के सवाल जनरेट करने के लिए, सोर्स के कई यूआरएल से मिली जानकारी को एक साथ जोड़ना.
कोड और तकनीकी कॉन्टेंट का विश्लेषण करना: कोड के बारे में बताने, सेटअप के निर्देश जनरेट करने या सवालों के जवाब देने के लिए, GitHub रिपॉज़िटरी या तकनीकी दस्तावेज़ों के यूआरएल देना.
यूआरएल कॉन्टेक्स्ट टूल का इस्तेमाल करते समय, पक्का करें कि आपने सबसे सही तरीके और सीमाओं की समीक्षा कर ली हो.
काम करने वाले मॉडल
gemini-3.1-pro-previewgemini-3.5-flashgemini-3.1-flash-litegemini-2.5-progemini-2.5-flashgemini-2.5-flash-lite
यह सुविधा इन भाषाओं में काम करती है
काम करने वाली भाषाएं देखें, Gemini मॉडल के लिए.
यूआरएल कॉन्टेक्स्ट टूल का इस्तेमाल करना
यूआरएल कॉन्टेक्स्ट टूल का इस्तेमाल दो मुख्य तरीकों से किया जा सकता है:
के साथ, भरोसेमंद स्रोतों से मिले जवाब की सुविधा के साथ इस्तेमाल करना ग्राउंडिंग के साथ
Google Search
सिर्फ़ यूआरएल कॉन्टेक्स्ट टूल
|
इस पेज पर, अपने Gemini API प्रोवाइडर के हिसाब से कॉन्टेंट और कोड देखने के लिए, उस पर क्लिक करें. |
GenerativeModel इंस्टेंस बनाते समय, UrlContext को एक टूल के तौर पर शामिल करें.
इसके बाद, अपने प्रॉम्प्ट में सीधे तौर पर वे यूआरएल शामिल करें जिन्हें मॉडल को ऐक्सेस और उनका विश्लेषण करना है.
यहां दिए गए उदाहरण में, अलग-अलग वेबसाइटों से मिली दो रेसिपी की तुलना करने का तरीका बताया गया है:
Swift
import FirebaseAILogic
// Initialize the Gemini Developer API backend service.
let ai = FirebaseAI.firebaseAI(backend: .googleAI())
// Create a `GenerativeModel` instance with a model that supports your use case.
let model = ai.generativeModel(
modelName: "GEMINI_MODEL_NAME",
// Enable the URL context tool.
tools: [Tool.urlContext()]
)
// Specify one or more URLs for the tool to access.
let url1 = "FIRST_RECIPE_URL"
let url2 = "SECOND_RECIPE_URL"
// Provide the URLs in the prompt sent in the request.
let prompt = "Compare the ingredients and cooking times from the recipes at \(url1) and \(url2)"
// Get and handle the model's response.
let response = try await model.generateContent(prompt)
print(response.text ?? "No text in response.")
Kotlin
// 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",
// Enable the URL context tool.
tools = listOf(Tool.urlContext())
)
// Specify one or more URLs for the tool to access.
val url1 = "FIRST_RECIPE_URL"
val url2 = "SECOND_RECIPE_URL"
// Provide the URLs in the prompt sent in the request.
val prompt = "Compare the ingredients and cooking times from the recipes at $url1 and $url2"
// Get and handle the model's response.
val response = model.generateContent(prompt)
print(response.text)
Java
// 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,
// Enable the URL context tool.
List.of(Tool.urlContext(new UrlContext())));
// Use the GenerativeModelFutures Java compatibility layer which offers
// support for ListenableFuture and Publisher APIs
GenerativeModelFutures model = GenerativeModelFutures.from(ai);
// Specify one or more URLs for the tool to access.
String url1 = "FIRST_RECIPE_URL";
String url2 = "SECOND_RECIPE_URL";
// Provide the URLs in the prompt sent in the request.
String prompt = "Compare the ingredients and cooking times from the recipes at " + url1 + " and " + url2 + "";
ListenableFuture response = model.generateContent(prompt);
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);
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() });
// Create a `GenerativeModel` instance with a model that supports your use case
const model = getGenerativeModel(
ai,
{
model: "GEMINI_MODEL_NAME",
// Enable the URL context tool.
tools: [{ urlContext: {} }]
}
);
// Specify one or more URLs for the tool to access.
const url1 = "FIRST_RECIPE_URL"
const url2 = "SECOND_RECIPE_URL"
// Provide the URLs in the prompt sent in the request.
const prompt = `Compare the ingredients and cooking times from the recipes at ${url1} and ${url2}`
// Get and handle the model's response.
const result = await model.generateContent(prompt);
console.log(result.response.text());
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,
);
// 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',
// Enable the URL context tool.
tools: [
Tool.urlContext(),
],
);
// Specify one or more URLs for the tool to access.
final url1 = "FIRST_RECIPE_URL";
final url2 = "SECOND_RECIPE_URL";
// Provide the URLs in the prompt sent in the request.
final prompt = "Compare the ingredients and cooking times from the recipes at $url1 and $url2";
// Get and handle the model's response.
final response = await model.generateContent([Content.text(prompt)]);
print(response.text);
Unity
using Firebase;
using Firebase.AI;
// Initialize the Gemini Developer API backend service.
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.GoogleAI());
// Create a `GenerativeModel` instance with a model that supports your use case.
var model = ai.GetGenerativeModel(
modelName: "GEMINI_MODEL_NAME",
// Enable the URL context tool.
tools: new[] { new Tool(new UrlContext()) }
);
// Specify one or more URLs for the tool to access.
var url1 = "FIRST_RECIPE_URL";
var url2 = "SECOND_RECIPE_URL";
// Provide the URLs in the prompt sent in the request.
var prompt = $"Compare the ingredients and cooking times from the recipes at {url1} and {url2}";
// Get and handle the model's response.
var response = await model.GenerateContentAsync(prompt);
UnityEngine.Debug.Log(response.Text ?? "No text in response.");
अपने इस्तेमाल के उदाहरण और ऐप्लिकेशन के हिसाब से, मॉडल चुनने का तरीका जानें. मॉडल की जगह चुनना ज़रूरी नहीं है.
URL context combined with Grounding with Google Search
|
इस पेज पर, अपने Gemini API प्रोवाइडर के हिसाब से कॉन्टेंट और कोड देखने के लिए, उस पर क्लिक करें. |
यूआरएल कॉन्टेक्स्ट और
जब
यहां इनके इस्तेमाल के कुछ उदाहरण दिए गए हैं:
जनरेट किए गए कुछ जवाबों में मदद पाने के लिए, प्रॉम्प्ट में एक यूआरएल शामिल करना. हालांकि, सही जवाब जनरेट करने के लिए, मॉडल को अन्य विषयों के बारे में ज़्यादा जानकारी की ज़रूरत होती है. इसलिए, वह Google Search के साथ, भरोसेमंद स्रोतों से मिले जवाब की सुविधा का इस्तेमाल करता है.
Google Search प्रॉम्प्ट का उदाहरण:
Give me a three day event schedule based on YOUR_URL. Also what do I need to pack according to the weather?प्रॉम्प्ट में कोई यूआरएल शामिल न करना. इसलिए, सही जवाब जनरेट करने के लिए, मॉडल भरोसेमंद स्रोतों से मिले जवाब की सुविधा के साथ,
Google Search टूल का इस्तेमाल करके, काम के यूआरएल ढूंढता है. इसके बाद, उनके कॉन्टेंट का विश्लेषण करने के लिए, यूआरएल कॉन्टेक्स्ट टूल का इस्तेमाल करता है.प्रॉम्प्ट का उदाहरण:
Recommend 3 beginner-level books to learn about the latest YOUR_SUBJECT.
यहां दिए गए उदाहरण में, यूआरएल कॉन्टेक्स्ट और
Swift
import FirebaseAILogic
// Initialize the Gemini Developer API backend service.
let ai = FirebaseAI.firebaseAI(backend: .googleAI())
// Create a `GenerativeModel` instance with a model that supports your use case.
let model = ai.generativeModel(
modelName: "GEMINI_MODEL_NAME",
// Enable both the URL context tool and Google Search tool.
tools: [
Tool.urlContex(),
Tool.googleSearch()
]
)
// Specify one or more URLs for the tool to access.
let url = "YOUR_URL"
// Provide the URLs in the prompt sent in the request.
// If the model can't generate a response using its own knowledge or the content in the specified URL,
// then the model will use the grounding with Google Search tool.
let prompt = "Give me a three day event schedule based on \(url). Also what do I need to pack according to the weather?"
// Get and handle the model's response.
let response = try await model.generateContent(prompt)
print(response.text ?? "No text in response.")
// Make sure to comply with the "Grounding with Google Search" usage requirements,
// which includes how you use and display the grounded result
Kotlin
// 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",
// Enable both the URL context tool and Google Search tool.
tools = listOf(Tool.urlContext(), Tool.googleSearch())
)
// Specify one or more URLs for the tool to access.
val url = "YOUR_URL"
// Provide the URLs in the prompt sent in the request.
// If the model can't generate a response using its own knowledge or the content in the specified URL,
// then the model will use the grounding with Google Search tool.
val prompt = "Give me a three day event schedule based on $url. Also what do I need to pack according to the weather?"
// Get and handle the model's response.
val response = model.generateContent(prompt)
print(response.text)
// Make sure to comply with the "Grounding with Google Search" usage requirements,
// which includes how you use and display the grounded result
Java
// 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,
// Enable both the URL context tool and Google Search tool.
List.of(Tool.urlContext(new UrlContext()), Tool.googleSearch(new GoogleSearch())));
// Use the GenerativeModelFutures Java compatibility layer which offers
// support for ListenableFuture and Publisher APIs
GenerativeModelFutures model = GenerativeModelFutures.from(ai);
// Specify one or more URLs for the tool to access.
String url = "YOUR_URL";
// Provide the URLs in the prompt sent in the request.
// If the model can't generate a response using its own knowledge or the content in the specified URL,
// then the model will use the grounding with Google Search tool.
String prompt = "Give me a three day event schedule based on " + url + ". Also what do I need to pack according to the weather?";
ListenableFuture response = model.generateContent(prompt);
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 Search" usage requirements,
// which includes how you use and display the grounded result
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() });
// Create a `GenerativeModel` instance with a model that supports your use case.
const model = getGenerativeModel(
ai,
{
model: "GEMINI_MODEL_NAME",
// Enable both the URL context tool and Google Search tool.
tools: [{ urlContext: {} }, { googleSearch: {} }],
}
);
// Specify one or more URLs for the tool to access.
const url = "YOUR_URL"
// Provide the URLs in the prompt sent in the request.
// If the model can't generate a response using its own knowledge or the content in the specified URL,
// then the model will use the grounding with Google Search tool.
const prompt = `Give me a three day event schedule based on ${url}. Also what do I need to pack according to the weather?`
// Get and handle the model's response.
const result = await model.generateContent(prompt);
console.log(result.response.text());
// Make sure to comply with the "Grounding with Google Search" usage requirements,
// which includes how you use and display the grounded result
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,
);
// 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',
// Enable both the URL context tool and Google Search tool.
tools: [
Tool.urlContext(),
Tool.googleSearch(),
],
);
// Specify one or more URLs for the tool to access.
final url = "YOUR_URL";
// Provide the URLs in the prompt sent in the request.
// If the model can't generate a response using its own knowledge or the content in the specified URL,
// then the model will use the grounding with Google Search tool.
final prompt = "Give me a three day event schedule based on $url. Also what do I need to pack according to the weather?";
final response = await model.generateContent([Content.text(prompt)]);
print(response.text);
// Make sure to comply with the "Grounding with Google Search" usage requirements,
// which includes how you use and display the grounded result
Unity
using Firebase;
using Firebase.AI;
// Initialize the Gemini Developer API backend service.
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.GoogleAI());
// Create a `GenerativeModel` instance with a model that supports your use case.
var model = ai.GetGenerativeModel(
modelName: "GEMINI_MODEL_NAME",
// Enable both the URL context tool and Google Search tool.
tools: new[] { new Tool(new GoogleSearch()), new Tool(new UrlContext()) }
);
// Specify one or more URLs for the tool to access.
var url = "YOUR_URL";
// Provide the URLs in the prompt sent in the request.
// If the model can't generate a response using its own knowledge or the content in the specified URL,
// then the model will use the grounding with Google Search tool.
var prompt = $"Give me a three day event schedule based on {url}. Also what do I need to pack according to the weather?";
// Get and handle the model's response.
var response = await model.GenerateContentAsync(prompt);
UnityEngine.Debug.Log(response.Text ?? "No text in response.");
// Make sure to comply with the "Grounding with Google Search" usage requirements,
// which includes how you use and display the grounded result
अपने इस्तेमाल के उदाहरण और ऐप्लिकेशन के हिसाब से, मॉडल चुनने का तरीका जानें. मॉडल की जगह चुनना ज़रूरी नहीं है.
यूआरएल कॉन्टेक्स्ट टूल कैसे काम करता है
यूआरएल कॉन्टेक्स्ट टूल, दो चरणों वाली प्रोसेस का इस्तेमाल करके डेटा इकट्ठा करता है. इससे, स्पीड, लागत, और नए डेटा को ऐक्सेस करने के बीच बैलेंस बनाए रखने में मदद मिलती है.
पहला चरण: जब कोई खास यूआरएल दिया जाता है, तो टूल सबसे पहले इंटरनल इंडेक्स कैश से कॉन्टेंट फ़ेच करने की कोशिश करता है. यह, बेहतर तरीके से ऑप्टिमाइज़ किए गए कैश के तौर पर काम करता है.
दूसरा चरण: अगर कोई यूआरएल इंडेक्स में उपलब्ध नहीं है (उदाहरण के लिए, अगर वह कोई बहुत नया पेज है), तो टूल अपने-आप लाइव फ़ेच करने लगता है. इससे, रीयल टाइम में कॉन्टेंट पाने के लिए, यूआरएल को सीधे तौर पर ऐक्सेस किया जाता है.
सबसे सही तरीके
खास यूआरएल देना: शानदार नतीजे पाने के लिए, उस कॉन्टेंट के सीधे यूआरएल दें जिसका विश्लेषण मॉडल को करना है. मॉडल, सिर्फ़ आपके दिए गए यूआरएल से कॉन्टेंट इकट्ठा करेगा. वह नेस्ट किए गए लिंक से कोई कॉन्टेंट इकट्ठा नहीं करेगा.
ऐक्सेस करने की सुविधा की जांच करना: पुष्टि करें कि आपके दिए गए यूआरएल, ऐसे पेजों पर न ले जाएं जिनके लिए लॉगिन करना ज़रूरी हो या जो पेवॉल के पीछे हों.
पूरा यूआरएल इस्तेमाल करना: प्रोटोकॉल के साथ पूरा यूआरएल दें. उदाहरण के लिए, सिर्फ़
example.comके बजायhttps://www.example.comका इस्तेमाल करें.
जवाब को समझना
मॉडल का जवाब, यूआरएल से इकट्ठा किए गए कॉन्टेंट पर आधारित होगा.
अगर मॉडल ने यूआरएल से कॉन्टेंट इकट्ठा किया है, तो जवाब में url_context_metadata शामिल होगा. ऐसा जवाब, कुछ इस तरह का दिख सकता है (जवाब के कुछ हिस्सों को छोटा करने के लिए हटाया गया है):
{
"candidates": [
{
"content": {
"parts": [
{
"text": "... \n"
}
],
"role": "model"
},
...
"url_context_metadata":
{
"url_metadata":
[
{
"retrieved_url": "https://www.example.com",
"url_retrieval_status": "URL_RETRIEVAL_STATUS_SUCCESS"
},
{
"retrieved_url": "https://www.example.org",
"url_retrieval_status": "URL_RETRIEVAL_STATUS_SUCCESS"
},
]
}
}
]
}
सुरक्षा जांच
सिस्टम, यूआरएल पर कॉन्टेंट मॉडरेशन की जांच करता है, ताकि यह पुष्टि की जा सके कि वे सुरक्षा मानकों के मुताबिक हैं. अगर आपके दिए गए यूआरएल, इस जांच में पास नहीं होते हैं, तो आपको url_retrieval_status की वैल्यू URL_RETRIEVAL_STATUS_UNSAFE मिलेगी.
सीमाएं
यूआरएल कॉन्टेक्स्ट टूल की कुछ सीमाएं यहां दी गई हैं:
फ़ंक्शन कॉलिंग के साथ इस्तेमाल करना: यूआरएल कॉन्टेक्स्ट टूल का इस्तेमाल, ऐसे अनुरोध में नहीं किया जा सकता जिसमें फ़ंक्शन कॉलिंग का भी इस्तेमाल किया गया हो .
हर अनुरोध के लिए यूआरएल की सीमा: हर अनुरोध के लिए, ज़्यादा से ज़्यादा 20 यूआरएल शामिल किए जा सकते हैं.
यूआरएल के कॉन्टेंट के साइज़ की सीमा: किसी एक यूआरएल से इकट्ठा किए गए कॉन्टेंट का ज़्यादा से ज़्यादा साइज़ 34 एमबी हो सकता है.
अप-टू-डेट जानकारी: यह टूल, वेब पेजों के लाइव वर्शन फ़ेच नहीं करता. इसलिए, हो सकता है कि जानकारी अप-टू-डेट न हो या उसमें पुरानी जानकारी शामिल हो.
यूआरएल को सार्वजनिक तौर पर ऐक्सेस करने की सुविधा: दिए गए यूआरएल, वेब पर सार्वजनिक तौर पर ऐक्सेस किए जा सकने चाहिए. पेवॉल किया गया कॉन्टेंट, ऐसा कॉन्टेंट जिसके लिए उपयोगकर्ता को साइन इन करना ज़रूरी है, प्राइवेट नेटवर्क, लोकल होस्ट पते (जैसे,
localhostया127.0.0.1), और टनलिंग सेवाओं (जैसे, ngrok या pinggy) के लिए, यह सुविधा काम नहीं करती .
कॉन्टेंट के वे टाइप जिनके लिए यह सुविधा काम करती है और जिनके लिए नहीं
काम करने वाले टाइप: यह टूल, इन टाइप के कॉन्टेंट वाले यूआरएल से कॉन्टेंट इकट्ठा कर सकता है:
टेक्स्ट (
text/html,application/json,text/plain,text/xml,text/css,text/javascript,text/csv,text/rtf)इमेज (
image/png,image/jpeg,image/bmp,image/webp)PDF (
application/pdf)
काम न करने वाले टाइप: यह टूल, इन टाइप के कॉन्टेंट के लिए काम नहीं करता:
YouTube वीडियो. इसके बजाय, वीडियो का विश्लेषण करना देखें
वीडियो और ऑडियो फ़ाइलें. इसके बजाय, वीडियो का विश्लेषण करना या ऑडियो का विश्लेषण करना देखें
Google Workspace की फ़ाइलें, जैसे कि Google Docs या स्प्रेडशीट
(Vertex AI Gemini APIVertex AI Gemini API का इस्तेमाल करने पर) Cloud Storage यूआरएल
Gemini Developer API से इन टाइप के यूआरएल को ऐक्सेस नहीं किया जा सकता.Gemini Developer APIऐसा कॉन्टेंट जिसे सार्वजनिक तौर पर ऐक्सेस नहीं किया जा सकता. पेवॉल किया गया कॉन्टेंट, ऐसा कॉन्टेंट जिसके लिए उपयोगकर्ता को साइन इन करना ज़रूरी है, प्राइवेट नेटवर्क, लोकल होस्ट पते (जैसे,
localhostया127.0.0.1), और टनलिंग सेवाओं (जैसे, ngrok या pinggy) के लिए, यह सुविधा काम नहीं करती .
टूल के टोकन की कीमत और उन्हें गिनने का तरीका
यूआरएल से इकट्ठा किए गए कॉन्टेंट को, इनपुट टोकन के तौर पर गिना जाता है.
मॉडल के आउटपुट के usage_metadata ऑब्जेक्ट में, अपने प्रॉम्प्ट के लिए टोकन की संख्या और टूल के इस्तेमाल की जानकारी देखी जा सकती है. यहां आउटपुट का एक उदाहरण दिया गया है:
'usage_metadata': {
'candidates_token_count': 45,
'prompt_token_count': 27,
'prompt_tokens_details': [{'modality': <MediaModality.TEXT: 'TEXT'>,
'token_count': 27}],
'thoughts_token_count': 31,
'tool_use_prompt_token_count': 10309,
'tool_use_prompt_tokens_details': [{'modality': <MediaModality.TEXT: 'TEXT'>,
'token_count': 10309}],
'total_token_count': 10412
}
रेट लिमिट और कीमत, इस्तेमाल किए गए मॉडल पर आधारित होती है. चुने गए Gemini API प्रोवाइडर के दस्तावेज़ में, यूआरएल कॉन्टेक्स्ट टूल की कीमत के बारे में ज़्यादा जानें: Gemini Developer API | Vertex AI Gemini API.
Firebase