আমাদের সবচেয়ে সাশ্রয়ী মাল্টিমোডাল মডেল, যা উচ্চ-ফ্রিকোয়েন্সি ও হালকা কাজের জন্য দ্রুততম পারফরম্যান্স প্রদান করে। জেমিনি ৩.১ ফ্ল্যাশ-লাইট উচ্চ-পরিমাণের এজেন্টিক কাজ, সাধারণ ডেটা নিষ্কাশন এবং অত্যন্ত কম-লেটেন্সির অ্যাপ্লিকেশনের জন্য সর্বোত্তম, যেখানে বাজেট এবং গতিই প্রধান সীমাবদ্ধতা।
gemini-3.1-flash-lite-preview
| সম্পত্তি | বর্ণনা |
|---|---|
| মডেল কোড | gemini-3.1-flash-lite-preview |
| সমর্থিত ডেটা প্রকারগুলি | ইনপুট টেক্সট, ছবি, ভিডিও, অডিও এবং পিডিএফ আউটপুট পাঠ্য |
| টোকেন সীমা [*] | ইনপুট টোকেন সীমা ১,০৪৮,৫৭৬ আউটপুট টোকেন সীমা ৬৫,৫৩৬ |
| সক্ষমতা | অডিও জেনারেশন সমর্থিত নয় ব্যাচ এপিআই সমর্থিত ক্যাশিং সমর্থিত কোড এক্সিকিউশন সমর্থিত কম্পিউটার ব্যবহার সমর্থিত নয় ফাইল অনুসন্ধান সমর্থিত ফাংশন কলিং সমর্থিত গুগল ম্যাপস দিয়ে গ্রাউন্ডিং সমর্থিত চিত্র তৈরি সমর্থিত নয় লাইভ এপিআই সমর্থিত নয় অনুসন্ধান ভিত্তি সমর্থিত কাঠামোগত আউটপুট সমর্থিত চিন্তা সমর্থিত URL প্রসঙ্গ সমর্থিত |
| সংস্করণ |
|
| সর্বশেষ আপডেট | মার্চ ২০২৬ |
| জ্ঞানের কাটঅফ | জানুয়ারি ২০২৫ |
ডেভেলপার গাইড
জেমিনি ৩.১ ফ্ল্যাশ-লাইট বড় পরিসরে সহজ-সরল কাজ সামলানোর জন্য সবচেয়ে উপযুক্ত। নিচে জেমিনি ৩.১ ফ্ল্যাশ-লাইটের জন্য সবচেয়ে উপযোগী কিছু ব্যবহারের ক্ষেত্র উল্লেখ করা হলো:
অনুবাদ : দ্রুত, সাশ্রয়ী এবং বিপুল পরিমাণে অনুবাদ, যেমন চ্যাট বার্তা, পর্যালোচনা এবং সাপোর্ট টিকেট বড় পরিসরে প্রক্রিয়াকরণ। আপনি সিস্টেম নির্দেশাবলী ব্যবহার করে আউটপুটকে শুধুমাত্র অনূদিত পাঠ্যে সীমাবদ্ধ রাখতে পারেন, যেখানে কোনো অতিরিক্ত মন্তব্য থাকবে না:
text = "Hey, are you down to grab some pizza later? I'm starving!" response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", config={ "system_instruction": "Only output the translated text" }, contents=f"Translate the following text to German: {text}" ) print(response.text)ট্রান্সক্রিপশন : আলাদা স্পিচ-টু-টেক্সট পাইপলাইন চালু না করেই রেকর্ডিং, ভয়েস নোট বা যেকোনো অডিও কন্টেন্টের টেক্সট ট্রান্সক্রিপ্ট প্রসেস করুন। এটি মাল্টিমোডাল ইনপুট সাপোর্ট করে, ফলে আপনি ট্রান্সক্রিপশনের জন্য সরাসরি অডিও ফাইল পাঠাতে পারেন।
# URL = "https://storage.googleapis.com/generativeai-downloads/data/State_of_the_Union_Address_30_January_1961.mp3" # Upload the audio file to the GenAI File API uploaded_file = client.files.upload(file='sample.mp3') prompt = 'Generate a transcript of the audio.' response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[prompt, uploaded_file] ) print(response.text)লাইটওয়েট এজেন্টিক টাস্ক এবং ডেটা এক্সট্র্যাকশন : স্ট্রাকচার্ড JSON আউটপুট সহ এনটিটি এক্সট্র্যাকশন, ক্লাসিফিকেশন এবং লাইটওয়েট ডেটা প্রসেসিং পাইপলাইন। উদাহরণস্বরূপ, একটি ই-কমার্স গ্রাহকের রিভিউ থেকে স্ট্রাকচার্ড ডেটা এক্সট্র্যাক্ট করা:
from pydantic import BaseModel, Field prompt = "Analyze the user review and determine the aspect, sentiment score, summary quote, and return risk" input_text = "The boots look amazing and the leather is high quality, but they run way too small. I'm sending them back." class ReviewAnalysis(BaseModel): aspect: str = Field(description="The feature mentioned (e.g., Price, Comfort, Style, Shipping)") summary_quote: str = Field(description="The specific phrase from the review about this aspect") sentiment_score: int = Field(description="1 to 5 (1=worst, 5=best)") is_return_risk: bool = Field(description="True if the user mentions returning the item") response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[prompt, input_text], config={ "response_mime_type": "application/json", "response_json_schema": ReviewAnalysis.model_json_schema(), }, ) print(response.text)ডকুমেন্ট প্রসেসিং এবং সারসংক্ষেপ তৈরি : পিডিএফ ফাইল পার্স করে সংক্ষিপ্ত সারসংক্ষেপ প্রদান করা, যেমন ডকুমেন্ট প্রসেসিং পাইপলাইন তৈরি করার জন্য বা আগত ফাইলগুলোকে দ্রুত বাছাই করার জন্য:
import httpx # Download a sample PDF document doc_url = "https://storage.googleapis.com/generativeai-downloads/data/med_gemini.pdf" doc_data = httpx.get(doc_url).content prompt = "Summarize this document" response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=[ types.Part.from_bytes( data=doc_data, mime_type='application/pdf', ), prompt ] ) print(response.text)মডেল রাউটিং : একটি ক্লাসিফায়ার হিসেবে এমন একটি লো-ল্যাটেন্সি ও লো-কস্ট মডেল ব্যবহার করুন যা টাস্কের জটিলতার উপর ভিত্তি করে কোয়েরিগুলোকে উপযুক্ত মডেলে রাউট করে। প্রোডাকশনে এটি একটি বাস্তব প্যাটার্ন — ওপেন-সোর্স Gemini CLI টাস্কের জটিলতা শ্রেণীবদ্ধ করতে এবং সেই অনুযায়ী Flash বা Pro-তে রাউট করতে Flash-Lite ব্যবহার করে।
FLASH_MODEL = 'flash' PRO_MODEL = 'pro' CLASSIFIER_SYSTEM_PROMPT = f""" You are a specialized Task Routing AI. Your sole function is to analyze the user's request and classify its complexity. Choose between `{FLASH_MODEL}` (SIMPLE) or `{PRO_MODEL}` (COMPLEX). 1. `{FLASH_MODEL}`: A fast, efficient model for simple, well-defined tasks. 2. `{PRO_MODEL}`: A powerful, advanced model for complex, open-ended, or multi-step tasks. A task is COMPLEX if it meets ONE OR MORE of the following criteria: 1. High Operational Complexity (Est. 4+ Steps/Tool Calls) 2. Strategic Planning and Conceptual Design 3. High Ambiguity or Large Scope 4. Deep Debugging and Root Cause Analysis A task is SIMPLE if it is highly specific, bounded, and has Low Operational Complexity (Est. 1-3 tool calls). """ user_input = "I'm getting an error 'Cannot read property 'map' of undefined' when I click the save button. Can you fix it?" response_schema = { "type": "object", "properties": { "reasoning": { "type": "string", "description": "A brief, step-by-step explanation for the model choice, referencing the rubric." }, "model_choice": { "type": "string", "enum": [FLASH_MODEL, PRO_MODEL] } }, "required": ["reasoning", "model_choice"] } response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents=user_input, config={ "system_instruction": CLASSIFIER_SYSTEM_PROMPT, "response_mime_type": "application/json", "response_json_schema": response_schema }, ) print(response.text)চিন্তাভাবনা : যেসব কাজে ধাপে ধাপে যুক্তির প্রয়োজন হয়, সেগুলোর নির্ভুলতা বাড়ানোর জন্য মডেলটিকে এমনভাবে কনফিগার করুন যাতে এটি চূড়ান্ত আউটপুট দেওয়ার আগে অভ্যন্তরীণ যুক্তির জন্য অতিরিক্ত গণনা শক্তি ব্যয় করে।
response = client.models.generate_content( model="gemini-3.1-flash-lite-preview", contents="How does AI work?", config=types.GenerateContentConfig( thinking_config=types.ThinkingConfig(thinking_level="high") ), ) print(response.text)