Modeli ynë multimodal më me kosto efektive, që ofron performancën më të shpejtë për detyra me frekuencë të lartë dhe të lehta. Gemini 3.1 Flash-Lite është më i miri për detyra agjentike me vëllim të lartë, nxjerrje të thjeshtë të të dhënave dhe aplikacione me vonesë jashtëzakonisht të ulët ku buxheti dhe shpejtësia janë kufizimet kryesore.
Gemini-3.1-Flash-Lite-Parashikim
| Pronë | Përshkrimi |
|---|---|
| Kodi i modelit të | gemini-3.1-flash-lite-preview |
| llojet e të dhënave të mbështetura | Të dhënat hyrëse Tekst, Imazh, Video, Audio dhe PDF Prodhimi Tekst |
| Limitet token-it [*] | Limiti i tokenit të hyrjes 1,048,576 Limiti i tokenit të daljes 65,536 |
| Aftësitë e | Gjenerimi i audios Nuk mbështetet API-ja e grupeve Mbështetur Ruajtja në memorje Mbështetur Ekzekutimi i kodit Mbështetur Përdorimi i kompjuterit Nuk mbështetet Kërkim skedarësh Mbështetur Thirrja e funksionit Mbështetur Tokëzimi me Google Maps Nuk mbështetet Gjenerimi i imazhit Nuk mbështetet API i drejtpërdrejtë Nuk mbështetet Kërkimi në tokë Mbështetur Rezultatet e strukturuara Mbështetur Të menduarit Mbështetur Konteksti i URL-së Mbështetur |
| Versione |
|
| Përditësimi më i fundit | Mars 2026 |
| i njohurive | Janar 2025 |
Udhëzuesi i zhvilluesit
Gemini 3.1 Flash-Lite është më i miri në trajtimin e detyrave të thjeshta në një shkallë të konsiderueshme. Ja disa raste përdorimi që janë më të përshtatshme për Gemini 3.1 Flash-Lite:
Përkthim : Përkthim i shpejtë, i lirë dhe me vëllim të lartë, siç është përpunimi i mesazheve të bisedës, vlerësimeve dhe tiketave të mbështetjes në shkallë të gjerë. Mund të përdorni udhëzimet e sistemit për të kufizuar rezultatin vetëm në tekstin e përkthyer pa komente shtesë:
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)Transkriptimi : Përpunoni regjistrime, shënime zanore ose çdo përmbajtje audio ku keni nevojë për një transkript teksti pa krijuar një kanal të veçantë të konvertimit të të folurit në tekst. Mbështet hyrjet multimodale, kështu që mund të kaloni skedarët audio direkt për transkriptim:
# 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)Detyra të lehta agjentike dhe nxjerrje të dhënash : Nxjerrja e entiteteve, klasifikimi dhe kanalet e përpunimit të të dhënave të lehta të mbështetura me dalje të strukturuar JSON. Për shembull, nxjerrja e të dhënave të strukturuara nga një vlerësim i klientit të tregtisë elektronike:
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)Përpunimi dhe përmbledhja e dokumenteve : Analizoni PDF-të dhe ktheni përmbledhje koncize, si për ndërtimin e një tubacioni përpunimi dokumentesh ose për klasifikimin e shpejtë të skedarëve hyrës:
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)Rrugimi i modelit : Përdorni një model me vonesë të ulët dhe kosto të ulët si klasifikues që drejton pyetjet në modelin e duhur bazuar në kompleksitetin e detyrës. Ky është një model real në prodhim - Gemini CLI me burim të hapur përdor Flash-Lite për të klasifikuar kompleksitetin e detyrës dhe për të drejtuar në Flash ose Pro në përputhje me rrethanat.
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)Të menduarit : Për saktësi më të mirë për detyrat që përfitojnë nga arsyetimi hap pas hapi, konfiguroni të menduarit në mënyrë që modeli të shpenzojë llogaritje shtesë në arsyetimin e brendshëm përpara se të prodhojë rezultatin përfundimtar:
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)