সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
জেমিনি প্রো এবং জেমিনি ফ্ল্যাশ মডেল পরিবারগুলি অ্যান্ড্রয়েড ডেভেলপারদের মাল্টিমোডাল এআই ক্ষমতা, ক্লাউডে অনুমান চালানো এবং অ্যান্ড্রয়েড অ্যাপগুলিতে চিত্র, অডিও, ভিডিও এবং পাঠ্য ইনপুটগুলি প্রসেসিং অফার করে৷
Gemini Pro : Gemini 2.5 Pro হল Google-এর অত্যাধুনিক চিন্তার মডেল, কোড, গণিত এবং STEM-এর জটিল সমস্যাগুলির সাথে সাথে দীর্ঘ প্রসঙ্গ ব্যবহার করে বড় ডেটাসেট, কোডবেস এবং নথি বিশ্লেষণ করতে সক্ষম।
জেমিনি ফ্ল্যাশ : জেমিনি ফ্ল্যাশ মডেলগুলি পরবর্তী প্রজন্মের বৈশিষ্ট্য এবং উন্নত ক্ষমতা প্রদান করে, যার মধ্যে রয়েছে উচ্চতর গতি, অন্তর্নির্মিত টুল ব্যবহার এবং একটি 1M টোকেন প্রসঙ্গ উইন্ডো।
ফায়ারবেস এআই লজিক
Firebase AI লজিক ডেভেলপারদের তাদের অ্যাপে Google-এর জেনারেটিভ এআই-কে নিরাপদে এবং সরাসরি যোগ করতে সক্ষম করে যা উন্নয়নকে সহজ করে এবং সফল উৎপাদন প্রস্তুতির জন্য টুল এবং পণ্য একীকরণের প্রস্তাব দেয়। এটি ক্লায়েন্ট অ্যান্ড্রয়েড SDK-কে সরাসরি একত্রিত করতে এবং ক্লায়েন্ট কোড থেকে Gemini API-কে কল করার জন্য প্রদান করে, একটি ব্যাকএন্ডের প্রয়োজনীয়তা দূর করে উন্নয়নকে সহজ করে।
API প্রদানকারী
Firebase AI লজিক আপনাকে নিম্নলিখিত Google Gemini API প্রদানকারীগুলি ব্যবহার করতে দেয়: Gemini Developer API এবং Vertex AI Gemini API ।
ইতিমধ্যেই Vertex AI/Google ক্লাউড ইকোসিস্টেমে এমবেড করা ডেভেলপারদের জন্য আদর্শ।
পুনরাবৃত্তি করুন এবং প্রম্পট দিয়ে পরীক্ষা করুন এবং এমনকি Vertex AI Studio ব্যবহার করে কোড স্নিপেট পান।
আপনার অ্যাপ্লিকেশনের জন্য উপযুক্ত API প্রদানকারী নির্বাচন করা আপনার ব্যবসা এবং প্রযুক্তিগত সীমাবদ্ধতার উপর ভিত্তি করে এবং Vertex AI এবং Google ক্লাউড ইকোসিস্টেমের সাথে পরিচিতি। বেশিরভাগ অ্যান্ড্রয়েড ডেভেলপাররা সবেমাত্র জেমিনি প্রো বা জেমিনি ফ্ল্যাশ ইন্টিগ্রেশন দিয়ে শুরু করা উচিত জেমিনি ডেভেলপার API দিয়ে। মডেল কনস্ট্রাক্টরে প্যারামিটার পরিবর্তন করে প্রদানকারীদের মধ্যে স্যুইচ করা হয়:
কোটলিন
// For Vertex AI, use `backend = GenerativeBackend.vertexAI()`valmodel=Firebase.ai(backend=GenerativeBackend.googleAI()).generativeModel("gemini-2.5-flash")valresponse=model.generateContent("Write a story about a magic backpack");valoutput=response.text
জাভা
// For Vertex AI, use `backend = GenerativeBackend.vertexAI()`GenerativeModelfirebaseAI=FirebaseAI.getInstance(GenerativeBackend.googleAI()).generativeModel("gemini-2.5-flash");// Use the GenerativeModelFutures Java compatibility layer which offers// support for ListenableFuture and Publisher APIsGenerativeModelFuturesmodel=GenerativeModelFutures.from(firebaseAI);Contentprompt=newContent.Builder().addText("Write a story about a magic backpack.").build();ListenableFuture<GenerateContentResponse>response=model.generateContent(prompt);Futures.addCallback(response,newFutureCallback<GenerateContentResponse>(){@OverridepublicvoidonSuccess(GenerateContentResponseresult){StringresultText=result.getText();[...]}@OverridepublicvoidonFailure(Throwablet){t.printStackTrace();}},executor);
Gemini API-এ অ্যাক্সেস ছাড়াও, Firebase AI Logic আপনার অ্যাপে AI-সক্ষম বৈশিষ্ট্যগুলির স্থাপনাকে সহজ করতে এবং উত্পাদনের জন্য প্রস্তুত হওয়ার জন্য পরিষেবাগুলির একটি সেট অফার করে:
অ্যাপ চেক
শুধুমাত্র অনুমোদিত ক্লায়েন্টদের রিসোর্স অ্যাক্সেস নিশ্চিত করে ফায়ারবেস অ্যাপ অপব্যবহার থেকে অ্যাপের ব্যাকএন্ডগুলিকে সুরক্ষা দেয়। এটি Google পরিষেবাগুলির (Firebase এবং Google ক্লাউড সহ) এবং কাস্টম ব্যাকএন্ডগুলির সাথে সংহত করে৷ অ্যাপ চেক প্লে ইন্টিগ্রিটি ব্যবহার করে যাচাই করে যে অনুরোধগুলি খাঁটি অ্যাপ এবং একটি অপ্রতিরোধ্য ডিভাইস থেকে এসেছে।
রিমোট কনফিগারেশন
আপনার অ্যাপে মডেলের নাম হার্ডকোড করার পরিবর্তে, আমরা Firebase Remote Config ব্যবহার করে একটি সার্ভার-নিয়ন্ত্রিত ভেরিয়েবল ব্যবহার করার পরামর্শ দিই। এটি আপনাকে আপনার অ্যাপের একটি নতুন সংস্করণ স্থাপন না করে বা আপনার ব্যবহারকারীদের একটি নতুন সংস্করণ বাছাই করার প্রয়োজন ছাড়াই আপনার অ্যাপ ব্যবহার করে মডেলটি গতিশীলভাবে আপডেট করতে দেয়৷ আপনি রিমোট কনফিগ থেকে A/B পরীক্ষার মডেল এবং প্রম্পট ব্যবহার করতে পারেন।
এআই পর্যবেক্ষণ
আপনার AI-সক্ষম বৈশিষ্ট্যগুলি কীভাবে কাজ করছে তা বোঝার জন্য আপনি Firebase কনসোলের মধ্যে AI মনিটরিং ড্যাশবোর্ড ব্যবহার করতে পারেন। আপনি আপনার Gemini API কলগুলির জন্য ব্যবহারের ধরণ, কর্মক্ষমতা মেট্রিক্স এবং ডিবাগিং তথ্য সম্পর্কে মূল্যবান অন্তর্দৃষ্টি পাবেন।
Firebase AI লজিকে মাইগ্রেট করুন
আপনি যদি ইতিমধ্যেই আপনার অ্যাপে Firebase SDK-এ Vertex AI ব্যবহার করছেন, মাইগ্রেশন গাইড পড়ুন।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-14 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-08-14 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Gemini AI models\n\nThe Gemini Pro and Gemini Flash model families offer Android developers\nmultimodal AI capabilities, running inference in the cloud and processing image,\naudio, video, and text inputs in Android apps.\n\n- **Gemini Pro**: Gemini 2.5 Pro is Google's state-of-the-art thinking model, capable of reasoning over complex problems in code, math, and STEM, as well as analyzing large datasets, codebases, and documents using long context.\n- **Gemini Flash**: The Gemini Flash models deliver next-gen features and improved capabilities, including superior speed, built-in tool use, and a 1M token context window.\n\n| **Note:** This document covers the cloud-based Gemini AI models. For on-device inference, [check out the Gemini Nano documentation](/ai/gemini-nano).\n\nFirebase AI Logic\n-----------------\n\nFirebase AI Logic enables developers to securely and directly add Google's\ngenerative AI into their apps simplifying development, and offers tools and\nproduct integrations for successful production readiness. It provides client\nAndroid SDKs to directly integrate and call Gemini APIs from client code,\nsimplifying development by eliminating the need for a backend.\n\nAPI providers\n-------------\n\nFirebase AI Logic lets you use the following Google Gemini API providers:\nGemini *Developer API* and Vertex *AI Gemini API*.\n**Figure 1.** Firebase AI Logic integration architecture.\n\nHere are the primary differences for each API provider:\n\n[**Gemini Developer API**](/ai/gemini/developer-api):\n\n- Get started at no-cost with a generous free tier without payment information required.\n- Optionally upgrade to the paid tier of the Gemini Developer API to scale as your user base grows.\n- Iterate and experiment with prompts and even get code snippets using [Google AI Studio](https://aistudio.google.com/).\n\n[**Vertex AI Gemini API**](/ai/vertex-ai-firebase):\n\n- Granular control over [where you access the model](https://cloud.google.com/compute/docs/regions-zones).\n- Ideal for developers already embedded in the Vertex AI/Google Cloud ecosystem.\n- Iterate and experiment with prompts and even get code snippets using [Vertex AI Studio](https://cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/quickstart).\n\nSelecting the appropriate API provider for your application is based on your\nbusiness and technical constraints, and familiarity with the Vertex AI and\nGoogle Cloud ecosystem. Most Android developers just getting started with Gemini\nPro or Gemini Flash integrations should begin with the Gemini Developer API.\nSwitching between providers is done by changing the parameter in the model\nconstructor: \n\n### Kotlin\n\n // For Vertex AI, use `backend = GenerativeBackend.vertexAI()`\n val model = Firebase.ai(backend = GenerativeBackend.googleAI())\n .generativeModel(\"gemini-2.5-flash\")\n\n val response = model.generateContent(\"Write a story about a magic backpack\");\n val output = response.text\n\n### Java\n\n // For Vertex AI, use `backend = GenerativeBackend.vertexAI()`\n GenerativeModel firebaseAI = FirebaseAI.getInstance(GenerativeBackend.googleAI())\n .generativeModel(\"gemini-2.5-flash\");\n\n // Use the GenerativeModelFutures Java compatibility layer which offers\n // support for ListenableFuture and Publisher APIs\n GenerativeModelFutures model = GenerativeModelFutures.from(firebaseAI);\n\n Content prompt = new Content.Builder()\n .addText(\"Write a story about a magic backpack.\")\n .build();\n\n ListenableFuture\u003cGenerateContentResponse\u003e response = model.generateContent(prompt);\n Futures.addCallback(response, new FutureCallback\u003cGenerateContentResponse\u003e() {\n @Override\n public void onSuccess(GenerateContentResponse result) {\n String resultText = result.getText();\n [...]\n }\n\n @Override\n public void onFailure(Throwable t) {\n t.printStackTrace();\n }\n }, executor);\n\nSee the full [list of available generative AI models](https://firebase.google.com/docs/vertex-ai/models) supported\nby Firebase AI Logic client SDKs.\n\nFirebase services\n-----------------\n\nIn addition to access to the Gemini API, Firebase AI Logic offers a set of\nservices to simplify the deployment of AI-enabled features to your app and get\nready for production:\n\n### App Check\n\n[Firebase App Check](https://firebase.google.com/docs/app-check) safeguards app backends from abuse by\nensuring only authorized clients access resources. It integrates with Google\nservices (including Firebase and Google Cloud) and custom backends. App Check\nuses [Play Integrity](/google/play/integrity) to verify that requests originate from the authentic\napp and an untampered device.\n\n### Remote Config\n\nInstead of hardcoding the model name in your app, we recommend using a\nserver-controlled variable using [Firebase Remote Config](https://firebase.google.com/docs/remote-config). This\nlets you dynamically update the model your app uses without having to deploy a\nnew version of your app or require your users to pick up a new version. You can\nalso use Remote Config to [A/B test](https://firebase.google.com/docs/ab-testing/abtest-config) models and prompts.\n\n### AI monitoring\n\nTo understand how your AI-enabled features are performing you can use the [AI\nmonitoring dashboard](https://firebase.google.com/docs/vertex-ai/monitoring) within the Firebase console. You'll get\nvaluable insights into usage patterns, performance metrics, and debugging\ninformation for your Gemini API calls.\n\nMigrate to Firebase AI Logic\n----------------------------\n\nIf you're already using the Vertex AI in Firebase SDK in your app, read the\n[migration guide](https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk)."]]