Gemini 3.1 Flash-Lite เป็นโมเดลมัลติโมดัลที่มีเวลาในการตอบสนองต่ำและคุ้มค่า ซึ่งได้รับการปรับให้เหมาะกับงานที่มีความถี่สูงและมีขนาดเล็ก โมเดลนี้รองรับอินพุตข้อความ รูปภาพ วิดีโอ เสียง และ PDF และได้รับการออกแบบมาสำหรับเวิร์กโฟลว์แบบ Agent ที่มีปริมาณมาก การดึงข้อมูลอย่างง่าย และแอปพลิเคชันที่เวลาในการตอบสนองและค่าใช้จ่าย API เป็นข้อจำกัดหลัก
gemini-3.1-flash-lite
| พร็อพเพอร์ตี้ | คำอธิบาย |
|---|---|
| รหัสโมเดล | gemini-3.1-flash-lite |
| ประเภทข้อมูลที่รองรับ |
อินพุต ข้อความ รูปภาพ วิดีโอ เสียง และ PDF เอาต์พุต ข้อความ |
| ขีดจำกัดโทเค็น[*] |
ขีดจำกัดโทเค็นอินพุต 1,048,576 ขีดจำกัดโทเค็นเอาต์พุต 65,536 |
| ความสามารถ |
ไม่รองรับ สิ่งที่ทำได้ สิ่งที่ทำได้ ไม่รองรับ สิ่งที่ทำได้ สิ่งที่ทำได้ การเชื่อมต่อแหล่งข้อมูลกับ Google Maps สิ่งที่ทำได้ ไม่รองรับ ไม่รองรับ การเชื่อมต่อแหล่งข้อมูลของ Search สิ่งที่ทำได้ สิ่งที่ทำได้ สิ่งที่ทำได้ สิ่งที่ทำได้ |
| ตัวเลือกการใช้งาน |
สิ่งที่ทำได้ สิ่งที่ทำได้ สิ่งที่ทำได้ |
| เวอร์ชัน |
|
| การอัปเดตล่าสุด | พฤษภาคม 2026 |
| การตัดข้อมูล | มกราคม 2025 |
คู่มือนักพัฒนาซอฟต์แวร์
Gemini 3.1 Flash-Lite เหมาะที่สุดสำหรับการจัดการงานที่ไม่ซับซ้อนในระดับที่สำคัญ ต่อไปนี้คือกรณีการใช้งานที่เหมาะกับ Gemini 3.1 Flash-Lite มากที่สุด
การแปล: การแปลปริมาณมากที่รวดเร็วและราคาไม่แพง เช่น การประมวลผล ข้อความแชท รีวิว และตั๋วสนับสนุนในระดับที่สำคัญ คุณสามารถใช้คำแนะนำของระบบเพื่อจำกัดเอาต์พุตให้มีเฉพาะข้อความที่แปลโดยไม่มีความคิดเห็นเพิ่มเติมได้
from google import genai client = genai.Client() text = "Hey, are you down to grab some pizza later? I'm starving!" response = client.models.generate_content( model="gemini-3.1-flash-lite", config={ "system_instruction": "Only output the translated text" }, contents=f"Translate the following text to German: {text}" ) print(response.text)การถอดเสียง: ประมวลผลไฟล์บันทึก โน้ตเสียง หรือเนื้อหาเสียงใดๆ ที่คุณต้องการข้อความถอดเสียงโดยไม่ต้องสร้างไปป์ไลน์การแปลงเสียงพูดเป็นข้อความแยกต่างหาก รองรับอินพุตมัลติโมดัล คุณจึงส่งไฟล์เสียงสำหรับการถอดเสียงได้โดยตรง
from google import genai client = genai.Client() # 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", contents=[prompt, uploaded_file] ) print(response.text)งานแบบเอเจนต์ที่มีขนาดเล็กและการดึงข้อมูล: การแยกเอนทิตี, การจัดประเภท และไปป์ไลน์การประมวลผลข้อมูลที่มีขนาดเล็กซึ่งรองรับเอาต์พุต JSON ที่มีโครงสร้าง เช่น การแยก Structured Data จากรีวิวจากลูกค้าอีคอมเมิร์ซ
from google import genai from pydantic import BaseModel, Field client = genai.Client() 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", contents=[prompt, input_text], config={ "response_mime_type": "application/json", "response_json_schema": ReviewAnalysis.model_json_schema(), }, ) print(response.text)การประมวลผลและการสรุปเอกสาร: แยกวิเคราะห์ PDF และแสดงข้อมูลสรุปที่กระชับ เช่น สำหรับการสร้างไปป์ไลน์การประมวลผลเอกสารหรือการจัดลำดับความสำคัญของไฟล์ขาเข้าอย่างรวดเร็ว:
from google import genai from google.genai import types import httpx client = genai.Client() # 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", contents=[ types.Part.from_bytes( data=doc_data, mime_type='application/pdf', ), prompt ] ) print(response.text)การกำหนดเส้นทางโมเดล: ใช้โมเดลที่มีเวลาในการตอบสนองต่ำและราคาไม่แพงเป็นตัวแยกประเภทที่ กำหนดเส้นทางคําค้นหาไปยังโมเดลที่เหมาะสมตามความซับซ้อนของงาน นี่เป็นรูปแบบที่ใช้จริงในการใช้งานจริง โดย Gemini CLI แบบโอเพนซอร์สใช้ Flash-Lite เพื่อแยกประเภทความซับซ้อนของงานและกำหนดเส้นทางไปยัง Flash หรือ Pro ตามความเหมาะสม
from google import genai client = genai.Client() 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", contents=user_input, config={ "system_instruction": CLASSIFIER_SYSTEM_PROMPT, "response_mime_type": "application/json", "response_json_schema": response_schema }, ) print(response.text)การคิด: หากต้องการความแม่นยำที่มากขึ้นสำหรับงานที่ต้องใช้การให้เหตุผลแบบทีละขั้นตอน ให้กำหนดค่าการคิดเพื่อให้โมเดลใช้การคำนวณเพิ่มเติมในการให้เหตุผลภายในก่อนที่จะสร้างเอาต์พุตสุดท้าย
from google import genai from google.genai import types client = genai.Client() response = client.models.generate_content( model="gemini-3.1-flash-lite", contents="How does AI work?", config=types.GenerateContentConfig( thinking_config=types.ThinkingConfig(thinking_level="high") ), ) print(response.text)