URL প্রসঙ্গ

URL কনটেক্সট টুল আপনাকে মডেলটিকে URL আকারে অতিরিক্ত কনটেক্সট প্রদান করতে দেয়। মডেলটি সেই URL গুলি থেকে কন্টেন্ট অ্যাক্সেস করতে পারে যাতে এর প্রতিক্রিয়া জানাতে এবং উন্নত করতে পারে।

URL প্রসঙ্গের নিম্নলিখিত সুবিধা রয়েছে:

  • তথ্য বের করুন : একটি নিবন্ধ বা একাধিক URL থেকে মূল্য, নাম, অথবা গুরুত্বপূর্ণ তথ্যের মতো নির্দিষ্ট তথ্য প্রদান করুন।

  • তথ্য তুলনা করুন : পার্থক্য সনাক্ত করতে এবং প্রবণতা ট্র্যাক করতে একাধিক প্রতিবেদন, নিবন্ধ বা পিডিএফ বিশ্লেষণ করুন।

  • সংশ্লেষণ এবং সামগ্রী তৈরি করুন : সঠিক সারসংক্ষেপ, ব্লগ পোস্ট, প্রতিবেদন বা পরীক্ষার প্রশ্ন তৈরি করতে বিভিন্ন উৎস URL থেকে তথ্য একত্রিত করুন।

  • কোড এবং প্রযুক্তিগত বিষয়বস্তু বিশ্লেষণ করুন : কোড ব্যাখ্যা করার জন্য, সেটআপ নির্দেশাবলী তৈরি করতে, অথবা প্রশ্নের উত্তর দেওয়ার জন্য একটি GitHub সংগ্রহস্থল বা প্রযুক্তিগত ডকুমেন্টেশনের URL প্রদান করুন।

URL প্রসঙ্গ টুল ব্যবহার করার সময় সেরা অনুশীলন এবং সীমাবদ্ধতাগুলি পর্যালোচনা করুন।

সমর্থিত মডেল

  • gemini-3-pro-preview
  • gemini-3-flash-preview
  • gemini-2.5-pro
  • gemini-2.5-flash
  • gemini-2.5-flash-lite

সমর্থিত ভাষা

জেমিনি মডেলের জন্য সমর্থিত ভাষাগুলি দেখুন।

URL প্রসঙ্গ টুল ব্যবহার করুন

আপনি URL কনটেক্সট টুলটি দুটি প্রধান উপায়ে ব্যবহার করতে পারেন:

শুধুমাত্র URL প্রসঙ্গ টুল

এই পৃষ্ঠায় প্রোভাইডার-নির্দিষ্ট কন্টেন্ট এবং কোড দেখতে আপনার জেমিনি API প্রোভাইডারে ক্লিক করুন।

যখন আপনি GenerativeModel ইনস্ট্যান্স তৈরি করবেন, তখন UrlContext একটি টুল হিসেবে প্রদান করুন। তারপর, সরাসরি আপনার প্রম্পটে, নির্দিষ্ট URL গুলি প্রদান করুন যা আপনি মডেলটি অ্যাক্সেস এবং বিশ্লেষণ করতে চান।

নিম্নলিখিত উদাহরণটি দেখায় কিভাবে বিভিন্ন ওয়েবসাইট থেকে দুটি রেসিপি তুলনা করা যায়:

সুইফট


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);

ঐক্য


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.");

মডেল কীভাবে নির্বাচন করবেন তা শিখুনআপনার ব্যবহারের ক্ষেত্রে এবং অ্যাপের জন্য উপযুক্ত।

এই পৃষ্ঠায় প্রোভাইডার-নির্দিষ্ট কন্টেন্ট এবং কোড দেখতে আপনার জেমিনি API প্রোভাইডারে ক্লিক করুন।

আপনি Google Search ব্যবহার করে URL কনটেক্সট এবং গ্রাউন্ডিং উভয়ই সক্ষম করতে পারেন। এই কনফিগারেশনের মাধ্যমে, আপনি নির্দিষ্ট URL সহ বা ছাড়াই প্রম্পট লিখতে পারেন।

যখন গুগল সার্চের সাথে গ্রাউন্ডিং সক্ষম করা থাকে, তখন মডেলটি প্রথমে প্রাসঙ্গিক তথ্য খুঁজে পেতে গুগল সার্চ ব্যবহার করতে পারে এবং তারপর তথ্যের আরও গভীরভাবে বোঝার জন্য অনুসন্ধান ফলাফলের বিষয়বস্তু পড়ার জন্য URL প্রসঙ্গ টুল ব্যবহার করতে পারে। এই পদ্ধতিটি এমন প্রম্পটগুলির জন্য শক্তিশালী যার জন্য বিস্তৃত অনুসন্ধান এবং নির্দিষ্ট পৃষ্ঠাগুলির গভীর বিশ্লেষণ উভয়েরই প্রয়োজন।

এখানে কিছু ব্যবহারের উদাহরণ দেওয়া হল:

  • আপনি প্রম্পটে একটি URL প্রদান করেন যা কিছু জেনারেট করা প্রতিক্রিয়ার সাথে সাহায্য করবে। তবে, একটি সঠিক প্রতিক্রিয়া তৈরি করতে, মডেলটির এখনও অন্যান্য বিষয় সম্পর্কে আরও তথ্যের প্রয়োজন, তাই এটি গ্রাউন্ডিং উইথ গুগল সার্চ টুল ব্যবহার করে।

    উদাহরণ প্রম্পট:
    Give me a three day event schedule based on YOUR_URL . Also what do I need to pack according to the weather?

  • আপনি প্রম্পটে কোনও URL প্রদান করেন না। তাই, সঠিক প্রতিক্রিয়া তৈরি করার জন্য, মডেলটি প্রাসঙ্গিক URL গুলি খুঁজে পেতে Google অনুসন্ধান টুলের সাথে গ্রাউন্ডিং ব্যবহার করে এবং তারপর তাদের বিষয়বস্তু বিশ্লেষণ করতে URL প্রসঙ্গ টুল ব্যবহার করে।

    উদাহরণ প্রম্পট:
    Recommend 3 beginner-level books to learn about the latest YOUR_SUBJECT .

নিম্নলিখিত উদাহরণে Google Search-এর মাধ্যমে URL কনটেক্সট এবং গ্রাউন্ডিং - উভয় টুলই কীভাবে সক্ষম এবং ব্যবহার করতে হয় তা দেখানো হয়েছে:


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


// 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


// 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


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


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


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

মডেল কীভাবে নির্বাচন করবেন তা শিখুনআপনার ব্যবহারের ক্ষেত্রে এবং অ্যাপের জন্য উপযুক্ত।

URL প্রসঙ্গ টুল কীভাবে কাজ করে

URL প্রসঙ্গ টুলটি গতি, খরচ এবং নতুন ডেটা অ্যাক্সেসের ভারসাম্য বজায় রাখতে দুই-পদক্ষেপ পুনরুদ্ধার প্রক্রিয়া ব্যবহার করে।

ধাপ ১ : যখন আপনি একটি নির্দিষ্ট URL প্রদান করেন, তখন টুলটি প্রথমে একটি অভ্যন্তরীণ সূচক ক্যাশে থেকে সামগ্রীটি আনার চেষ্টা করে। এটি একটি অত্যন্ত অপ্টিমাইজড ক্যাশে হিসেবে কাজ করে।

ধাপ ২ : যদি সূচীতে কোন URL উপলব্ধ না থাকে (উদাহরণস্বরূপ, যদি এটি একটি খুব নতুন পৃষ্ঠা হয়), তাহলে টুলটি স্বয়ংক্রিয়ভাবে লাইভ ফেচ করার জন্য ফিরে আসে। এটি সরাসরি URL অ্যাক্সেস করে রিয়েল-টাইমে এর সামগ্রী পুনরুদ্ধার করে।

সেরা অনুশীলন

  • নির্দিষ্ট URL গুলি প্রদান করুন : সেরা ফলাফলের জন্য, মডেলটি যে কন্টেন্ট বিশ্লেষণ করতে চান তার সরাসরি URL গুলি প্রদান করুন। মডেলটি কেবল আপনার প্রদত্ত URL গুলি থেকে কন্টেন্ট পুনরুদ্ধার করবে, নেস্টেড লিঙ্কগুলি থেকে কোনও কন্টেন্ট নয়।

  • অ্যাক্সেসিবিলিটি পরীক্ষা করুন : যাচাই করুন যে আপনার দেওয়া URL গুলি এমন পৃষ্ঠাগুলিতে নিয়ে যাচ্ছে না যেখানে লগইন প্রয়োজন হয় বা পেওয়ালের পিছনে রয়েছে।

  • সম্পূর্ণ URL ব্যবহার করুন : প্রোটোকল সহ সম্পূর্ণ URL প্রদান করুন (উদাহরণস্বরূপ, শুধুমাত্র example.com এর পরিবর্তে https://www.example.com )।

প্রতিক্রিয়া বুঝুন

মডেলটির প্রতিক্রিয়া URL গুলি থেকে প্রাপ্ত সামগ্রীর উপর ভিত্তি করে হবে।

যদি মডেলটি URL থেকে কন্টেন্ট পুনরুদ্ধার করে, তাহলে প্রতিক্রিয়াটিতে 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-এ একটি কন্টেন্ট মডারেশন চেক করে নিশ্চিত করে যে এটি নিরাপত্তা মান পূরণ করে। যদি আপনার দেওয়া URLটি এই চেকে ব্যর্থ হয়, তাহলে আপনি URL_RETRIEVAL_STATUS_UNSAFE এর একটি url_retrieval_status পাবেন।

সীমাবদ্ধতা

URL কনটেক্সট টুলের কিছু সীমাবদ্ধতা এখানে দেওয়া হল:

  • ফাংশন কলিংয়ের সাথে একত্রিত করা : URL কনটেক্সট টুলটি এমন একটি অনুরোধে ব্যবহার করা যাবে না যা ফাংশন কলিংও ব্যবহার করে।

  • প্রতি অনুরোধে URL-এর সীমা : প্রতি অনুরোধে সর্বোচ্চ 20টি URL থাকতে পারে।

  • URL কন্টেন্টের আকারের সীমা : একটি URL থেকে প্রাপ্ত কন্টেন্টের সর্বোচ্চ আকার হল 34MB।

  • সতেজতা : এই টুলটি ওয়েব পৃষ্ঠাগুলির লাইভ সংস্করণগুলি আনে না , তাই সতেজতা বা সম্ভাব্যভাবে পুরানো তথ্য নিয়ে কিছু সমস্যা থাকতে পারে।

  • URL পাবলিক অ্যাক্সেসিবিলিটি : প্রদত্ত URL গুলি ওয়েবে সর্বজনীনভাবে অ্যাক্সেসযোগ্য হতে হবে। নিম্নলিখিতগুলি সমর্থিত নয় : পেওয়ালযুক্ত সামগ্রী, ব্যবহারকারীর সাইন-ইন প্রয়োজন এমন সামগ্রী, ব্যক্তিগত নেটওয়ার্ক, স্থানীয় হোস্ট ঠিকানা (যেমন localhost বা 127.0.0.1 ), এবং টানেলিং পরিষেবা (যেমন ngrok বা pinggy)।

সমর্থিত এবং অসমর্থিত কন্টেন্টের ধরণ

সমর্থিত : এই টুলটি নিম্নলিখিত ধরণের কন্টেন্ট সহ URL গুলি থেকে কন্টেন্ট বের করতে পারে:

  • টেক্সট ( text/html , application/json , text/plain , text/xml , text/css , text/javascript , text/csv , text/rtf )

  • ছবি ( image/png , image/jpeg , image/bmp , image/webp )

  • পিডিএফ ( application/pdf )

সমর্থিত নয় : টুলটি নিম্নলিখিত ধরণের সামগ্রী সমর্থন করে না :

  • ইউটিউব ভিডিও (পরিবর্তে, "ভিডিও বিশ্লেষণ করুন" দেখুন)

  • ভিডিও এবং অডিও ফাইল (পরিবর্তে, "ভিডিও বিশ্লেষণ করুন " বা "অডিও বিশ্লেষণ করুন" দেখুন)

  • গুগল ওয়ার্কস্পেস ফাইল, যেমন গুগল ডক্স বা স্প্রেডশিট

  • (যদি Vertex AI Gemini API ব্যবহার করেন) Cloud Storage URL গুলি
    এই ধরণের URL গুলি আপনি যেভাবেই অ্যাক্সেস করুন না কেন, Gemini Developer API দ্বারা সমর্থিত নয়।

  • যে কন্টেন্টগুলি সর্বজনীনভাবে অ্যাক্সেসযোগ্য নয়। নিম্নলিখিতগুলি সমর্থিত নয় : পেওয়ালযুক্ত কন্টেন্ট, ব্যবহারকারীর সাইন-ইন প্রয়োজন এমন কন্টেন্ট, ব্যক্তিগত নেটওয়ার্ক, লোকালহোস্ট ঠিকানা (যেমন localhost বা 127.0.0.1 ), এবং টানেলিং পরিষেবা (যেমন ngrok বা pinggy)।

টুল টোকেনের মূল্য নির্ধারণ এবং গণনা

URL থেকে প্রাপ্ত বিষয়বস্তু ইনপুট টোকেন হিসেবে গণ্য হয়।

মডেল আউটপুটের 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 প্রদানকারী ডকুমেন্টেশনে URL কনটেক্স টুলের মূল্য নির্ধারণ সম্পর্কে আরও জানুন: Gemini Developer API |Vertex AI Gemini API