กำลังคิด

โมเดลซีรีส์ Gemini 3 และ 2.5 ใช้ "กระบวนการคิด" ภายในที่ช่วยปรับปรุงความสามารถในการให้เหตุผลและการวางแผนแบบหลายขั้นตอนได้อย่างมาก ทำให้โมเดลมีประสิทธิภาพสูงสำหรับงานที่ซับซ้อน เช่น การเขียนโค้ด คณิตศาสตร์ขั้นสูง และการวิเคราะห์ข้อมูล

คู่มือนี้จะแสดงวิธีใช้ความสามารถในการคิดของ Gemini โดยใช้ Gemini API

การสร้างเนื้อหาด้วยการคิด

การเริ่มส่งคำขอด้วยโมเดลการคิดจะคล้ายกับการส่งคำขอสร้างเนื้อหาอื่นๆ ความแตกต่างที่สำคัญคือการระบุโมเดลที่รองรับการคิดในช่อง model ดังที่แสดงในตัวอย่างการสร้างข้อความต่อไปนี้

Python

from google import genai

client = genai.Client()
prompt = "Explain the concept of Occam's Razor and provide a simple, everyday example."
response = client.models.generate_content(
    model="gemini-2.5-pro",
    contents=prompt
)

print(response.text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function main() {
  const prompt = "Explain the concept of Occam's Razor and provide a simple, everyday example.";

  const response = await ai.models.generateContent({
    model: "gemini-2.5-pro",
    contents: prompt,
  });

  console.log(response.text);
}

main();

Go

package main

import (
  "context"
  "fmt"
  "log"
  "os"
  "google.golang.org/genai"
)

func main() {
  ctx := context.Background()
  client, err := genai.NewClient(ctx, nil)
  if err != nil {
      log.Fatal(err)
  }

  prompt := "Explain the concept of Occam's Razor and provide a simple, everyday example."
  model := "gemini-2.5-pro"

  resp, _ := client.Models.GenerateContent(ctx, model, genai.Text(prompt), nil)

  fmt.Println(resp.Text())
}

REST

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent" \
 -H "x-goog-api-key: $GEMINI_API_KEY" \
 -H 'Content-Type: application/json' \
 -X POST \
 -d '{
   "contents": [
     {
       "parts": [
         {
           "text": "Explain the concept of Occam\'s Razor and provide a simple, everyday example."
         }
       ]
     }
   ]
 }'
 ```

สรุปความคิด

สรุปความคิดคือเวอร์ชันที่สังเคราะห์แล้วของความคิดดิบของโมเดล และให้ข้อมูลเชิงลึกเกี่ยวกับกระบวนการให้เหตุผลภายในของโมเดล โปรดทราบว่า ระดับความคิดและงบประมาณมีผลกับความคิดดิบของโมเดล ไม่ใช่สรุปความคิด

คุณเปิดใช้สรุปความคิดได้โดยตั้งค่า includeThoughts เป็น true ในการกำหนดค่าคำขอ จากนั้นคุณจะเข้าถึงข้อมูลสรุปได้โดยการวนซ้ำผ่าน response ของพารามิเตอร์ parts และตรวจสอบบูลีน thought

ตัวอย่างต่อไปนี้แสดงวิธีเปิดใช้และดึงข้อมูลสรุปความคิด โดยไม่ต้องสตรีม ซึ่งจะแสดงผลสรุปความคิดสุดท้ายรายการเดียวพร้อมกับ การตอบกลับ

Python

from google import genai
from google.genai import types

client = genai.Client()
prompt = "What is the sum of the first 50 prime numbers?"
response = client.models.generate_content(
  model="gemini-2.5-pro",
  contents=prompt,
  config=types.GenerateContentConfig(
    thinking_config=types.ThinkingConfig(
      include_thoughts=True
    )
  )
)

for part in response.candidates[0].content.parts:
  if not part.text:
    continue
  if part.thought:
    print("Thought summary:")
    print(part.text)
    print()
  else:
    print("Answer:")
    print(part.text)
    print()

JavaScript

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function main() {
  const response = await ai.models.generateContent({
    model: "gemini-2.5-pro",
    contents: "What is the sum of the first 50 prime numbers?",
    config: {
      thinkingConfig: {
        includeThoughts: true,
      },
    },
  });

  for (const part of response.candidates[0].content.parts) {
    if (!part.text) {
      continue;
    }
    else if (part.thought) {
      console.log("Thoughts summary:");
      console.log(part.text);
    }
    else {
      console.log("Answer:");
      console.log(part.text);
    }
  }
}

main();

Go

package main

import (
  "context"
  "fmt"
  "google.golang.org/genai"
  "os"
)

func main() {
  ctx := context.Background()
  client, err := genai.NewClient(ctx, nil)
  if err != nil {
      log.Fatal(err)
  }

  contents := genai.Text("What is the sum of the first 50 prime numbers?")
  model := "gemini-2.5-pro"
  resp, _ := client.Models.GenerateContent(ctx, model, contents, &genai.GenerateContentConfig{
    ThinkingConfig: &genai.ThinkingConfig{
      IncludeThoughts: true,
    },
  })

  for _, part := range resp.Candidates[0].Content.Parts {
    if part.Text != "" {
      if part.Thought {
        fmt.Println("Thoughts Summary:")
        fmt.Println(part.Text)
      } else {
        fmt.Println("Answer:")
        fmt.Println(part.Text)
      }
    }
  }
}

และนี่คือตัวอย่างการใช้การคิดด้วยการสตรีม ซึ่งจะแสดงข้อมูลสรุปแบบต่อเนื่อง ที่เพิ่มขึ้นเรื่อยๆ ในระหว่างการสร้าง

Python

from google import genai
from google.genai import types

client = genai.Client()

prompt = """
Alice, Bob, and Carol each live in a different house on the same street: red, green, and blue.
The person who lives in the red house owns a cat.
Bob does not live in the green house.
Carol owns a dog.
The green house is to the left of the red house.
Alice does not own a cat.
Who lives in each house, and what pet do they own?
"""

thoughts = ""
answer = ""

for chunk in client.models.generate_content_stream(
    model="gemini-2.5-pro",
    contents=prompt,
    config=types.GenerateContentConfig(
      thinking_config=types.ThinkingConfig(
        include_thoughts=True
      )
    )
):
  for part in chunk.candidates[0].content.parts:
    if not part.text:
      continue
    elif part.thought:
      if not thoughts:
        print("Thoughts summary:")
      print(part.text)
      thoughts += part.text
    else:
      if not answer:
        print("Answer:")
      print(part.text)
      answer += part.text

JavaScript

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

const prompt = `Alice, Bob, and Carol each live in a different house on the same
street: red, green, and blue. The person who lives in the red house owns a cat.
Bob does not live in the green house. Carol owns a dog. The green house is to
the left of the red house. Alice does not own a cat. Who lives in each house,
and what pet do they own?`;

let thoughts = "";
let answer = "";

async function main() {
  const response = await ai.models.generateContentStream({
    model: "gemini-2.5-pro",
    contents: prompt,
    config: {
      thinkingConfig: {
        includeThoughts: true,
      },
    },
  });

  for await (const chunk of response) {
    for (const part of chunk.candidates[0].content.parts) {
      if (!part.text) {
        continue;
      } else if (part.thought) {
        if (!thoughts) {
          console.log("Thoughts summary:");
        }
        console.log(part.text);
        thoughts = thoughts + part.text;
      } else {
        if (!answer) {
          console.log("Answer:");
        }
        console.log(part.text);
        answer = answer + part.text;
      }
    }
  }
}

await main();

Go

package main

import (
  "context"
  "fmt"
  "log"
  "os"
  "google.golang.org/genai"
)

const prompt = `
Alice, Bob, and Carol each live in a different house on the same street: red, green, and blue.
The person who lives in the red house owns a cat.
Bob does not live in the green house.
Carol owns a dog.
The green house is to the left of the red house.
Alice does not own a cat.
Who lives in each house, and what pet do they own?
`

func main() {
  ctx := context.Background()
  client, err := genai.NewClient(ctx, nil)
  if err != nil {
      log.Fatal(err)
  }

  contents := genai.Text(prompt)
  model := "gemini-2.5-pro"

  resp := client.Models.GenerateContentStream(ctx, model, contents, &genai.GenerateContentConfig{
    ThinkingConfig: &genai.ThinkingConfig{
      IncludeThoughts: true,
    },
  })

  for chunk := range resp {
    for _, part := range chunk.Candidates[0].Content.Parts {
      if len(part.Text) == 0 {
        continue
      }

      if part.Thought {
        fmt.Printf("Thought: %s\n", part.Text)
      } else {
        fmt.Printf("Answer: %s\n", part.Text)
      }
    }
  }
}

การควบคุมความคิด

โมเดล Gemini จะใช้การคิดแบบไดนามิกโดยค่าเริ่มต้น ซึ่งจะปรับ ความพยายามในการให้เหตุผลโดยอัตโนมัติตามความซับซ้อนของคำขอของผู้ใช้ อย่างไรก็ตาม หากคุณมีข้อจำกัดด้านเวลาในการตอบสนองที่เฉพาะเจาะจง หรือต้องการให้โมเดลมีส่วนร่วม ในการให้เหตุผลที่ลึกซึ้งกว่าปกติ คุณสามารถใช้พารามิเตอร์เพื่อควบคุม ลักษณะการคิดได้

ระดับการคิด (Gemini 3 Pro)

พารามิเตอร์ thinkingLevel ซึ่งแนะนำให้ใช้กับโมเดล Gemini 3 ขึ้นไป ช่วยให้คุณควบคุมลักษณะการทำงานของการให้เหตุผลได้ คุณตั้งค่าระดับการคิดเป็น "low" หรือ "high" ได้ หากคุณไม่ได้ระบุระดับการคิด Gemini จะใช้ระดับการคิดแบบไดนามิกเริ่มต้นของโมเดล "high" สำหรับ Gemini 3 Pro เวอร์ชันตัวอย่าง

Python

from google import genai
from google.genai import types

client = genai.Client()

response = client.models.generate_content(
    model="gemini-3-pro-preview",
    contents="Provide a list of 3 famous physicists and their key contributions",
    config=types.GenerateContentConfig(
        thinking_config=types.ThinkingConfig(thinking_level="low")
    ),
)

print(response.text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function main() {
  const response = await ai.models.generateContent({
    model: "gemini-3-pro-preview",
    contents: "Provide a list of 3 famous physicists and their key contributions",
    config: {
      thinkingConfig: {
        thinkingLevel: "low",
      },
    },
  });

  console.log(response.text);
}

main();

Go

package main

import (
  "context"
  "fmt"
  "google.golang.org/genai"
  "os"
)

func main() {
  ctx := context.Background()
  client, err := genai.NewClient(ctx, nil)
  if err != nil {
      log.Fatal(err)
  }

  thinkingLevelVal := "low"

  contents := genai.Text("Provide a list of 3 famous physicists and their key contributions")
  model := "gemini-3-pro-preview"
  resp, _ := client.Models.GenerateContent(ctx, model, contents, &genai.GenerateContentConfig{
    ThinkingConfig: &genai.ThinkingConfig{
      ThinkingLevel: &thinkingLevelVal,
    },
  })

fmt.Println(resp.Text())
}

REST

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-preview:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
  "contents": [
    {
      "parts": [
        {
          "text": "Provide a list of 3 famous physicists and their key contributions"
        }
      ]
    }
  ],
  "generationConfig": {
    "thinkingConfig": {
          "thinkingLevel": "low"
    }
  }
}'

คุณปิดใช้การคิดสำหรับ Gemini 3 Pro ไม่ได้ โมเดลซีรีส์ Gemini 2.5 ไม่รองรับ thinkingLevel ให้ใช้ thinkingBudget แทน

งบประมาณการคิด

พารามิเตอร์ thinkingBudget ซึ่งเปิดตัวพร้อมกับซีรีส์ Gemini 2.5 จะแนะนำ โมเดลเกี่ยวกับจำนวนโทเค็นการคิดที่เฉพาะเจาะจงที่จะใช้สำหรับการให้เหตุผล

thinkingBudgetรายละเอียดการกำหนดค่าสำหรับโมเดลแต่ละประเภทมีดังนี้ คุณปิดใช้การคิดได้โดยตั้งค่า thinkingBudget เป็น 0 การตั้งค่า thinkingBudget เป็น -1 จะเปิดการคิดแบบไดนามิก ซึ่งหมายความว่าโมเดลจะปรับงบประมาณตามความซับซ้อนของคำขอ

รุ่น การตั้งค่าเริ่มต้น
(คิดว่าไม่ได้ตั้งงบประมาณ)
ช่วง ปิดใช้การคิด เปิดใช้การคิดแบบไดนามิก
2.5 Pro การคิดแบบไดนามิก: โมเดลจะตัดสินใจว่าจะคิดเมื่อใดและคิดมากน้อยเพียงใด 128 ถึง 32768 ไม่สามารถปิดใช้การคิดได้ thinkingBudget = -1
2.5 Flash การคิดแบบไดนามิก: โมเดลจะตัดสินใจว่าจะคิดเมื่อใดและคิดมากน้อยเพียงใด 0 ถึง 24576 thinkingBudget = 0 thinkingBudget = -1
2.5 Flash Preview การคิดแบบไดนามิก: โมเดลจะตัดสินใจว่าจะคิดเมื่อใดและคิดมากน้อยเพียงใด 0 ถึง 24576 thinkingBudget = 0 thinkingBudget = -1
2.5 Flash Lite โมเดลไม่คิด 512 ถึง 24576 thinkingBudget = 0 thinkingBudget = -1
2.5 ตัวอย่าง Flash Lite โมเดลไม่คิด 512 ถึง 24576 thinkingBudget = 0 thinkingBudget = -1
Robotics-ER 1.5 เวอร์ชันตัวอย่าง การคิดแบบไดนามิก: โมเดลจะตัดสินใจว่าจะคิดเมื่อใดและคิดมากน้อยเพียงใด 0 ถึง 24576 thinkingBudget = 0 thinkingBudget = -1
2.5 ตัวอย่างเสียงสดเนทีฟของ Flash (09-2025) การคิดแบบไดนามิก: โมเดลจะตัดสินใจว่าจะคิดเมื่อใดและคิดมากน้อยเพียงใด 0 ถึง 24576 thinkingBudget = 0 thinkingBudget = -1

Python

from google import genai
from google.genai import types

client = genai.Client()

response = client.models.generate_content(
    model="gemini-2.5-pro",
    contents="Provide a list of 3 famous physicists and their key contributions",
    config=types.GenerateContentConfig(
        thinking_config=types.ThinkingConfig(thinking_budget=1024)
        # Turn off thinking:
        # thinking_config=types.ThinkingConfig(thinking_budget=0)
        # Turn on dynamic thinking:
        # thinking_config=types.ThinkingConfig(thinking_budget=-1)
    ),
)

print(response.text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function main() {
  const response = await ai.models.generateContent({
    model: "gemini-2.5-pro",
    contents: "Provide a list of 3 famous physicists and their key contributions",
    config: {
      thinkingConfig: {
        thinkingBudget: 1024,
        // Turn off thinking:
        // thinkingBudget: 0
        // Turn on dynamic thinking:
        // thinkingBudget: -1
      },
    },
  });

  console.log(response.text);
}

main();

Go

package main

import (
  "context"
  "fmt"
  "google.golang.org/genai"
  "os"
)

func main() {
  ctx := context.Background()
  client, err := genai.NewClient(ctx, nil)
  if err != nil {
      log.Fatal(err)
  }

  thinkingBudgetVal := int32(1024)

  contents := genai.Text("Provide a list of 3 famous physicists and their key contributions")
  model := "gemini-2.5-pro"
  resp, _ := client.Models.GenerateContent(ctx, model, contents, &genai.GenerateContentConfig{
    ThinkingConfig: &genai.ThinkingConfig{
      ThinkingBudget: &thinkingBudgetVal,
      // Turn off thinking:
      // ThinkingBudget: int32(0),
      // Turn on dynamic thinking:
      // ThinkingBudget: int32(-1),
    },
  })

fmt.Println(resp.Text())
}

REST

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
  "contents": [
    {
      "parts": [
        {
          "text": "Provide a list of 3 famous physicists and their key contributions"
        }
      ]
    }
  ],
  "generationConfig": {
    "thinkingConfig": {
          "thinkingBudget": 1024
    }
  }
}'

โมเดลอาจใช้โทเค็นเกินหรืองบประมาณโทเค็นไม่เพียงพอ ทั้งนี้ขึ้นอยู่กับพรอมต์

ลายเซ็นความคิด

Gemini API เป็นแบบไม่มีสถานะ ดังนั้นโมเดลจะถือว่าคำขอ API ทุกรายการเป็นอิสระ และไม่มีสิทธิ์เข้าถึงบริบทความคิดจากเทิร์นก่อนหน้าในการโต้ตอบแบบหลายเทิร์น

Gemini จะแสดงลายเซ็นความคิด ซึ่งเป็นการแสดงที่เข้ารหัสของ กระบวนการคิดภายในของโมเดล เพื่อให้สามารถรักษาบริบทความคิดในการโต้ตอบแบบหลายรอบได้

  • โมเดล Gemini 2.5 จะแสดงลายเซ็นความคิดเมื่อเปิดใช้การคิดและ คำขอมีการเรียกใช้ฟังก์ชัน โดยเฉพาะการประกาศฟังก์ชัน
  • โมเดล Gemini 3 อาจแสดงลายเซ็นความคิดสำหรับชิ้นส่วนทุกประเภท เราขอแนะนำให้คุณส่งต่อลายเซ็นทั้งหมดกลับไปตามที่ได้รับเสมอ แต่สำหรับลายเซ็นการเรียกใช้ฟังก์ชันนั้น จำเป็น อ่านหน้าลายเซ็นความคิดเพื่อดูข้อมูลเพิ่มเติม

Google GenAI SDK จะจัดการ การส่งคืนลายเซ็นความคิดให้คุณโดยอัตโนมัติ คุณจะต้องจัดการลายเซ็นความคิดด้วยตนเองก็ต่อเมื่อแก้ไขประวัติการสนทนาหรือใช้ REST API

ข้อจำกัดในการใช้งานอื่นๆ ที่ควรพิจารณาเมื่อใช้การเรียกใช้ฟังก์ชันมีดังนี้

  • ระบบจะแสดงลายเซ็นจากโมเดลภายในส่วนอื่นๆ ในการตอบกลับ เช่น การเรียกใช้ฟังก์ชันหรือข้อความ ส่งคืนคำตอบทั้งหมด พร้อมกับทุกส่วนกลับไปยังโมเดลในรอบถัดไป
  • อย่าต่อชิ้นส่วนที่มีลายเซ็นเข้าด้วยกัน
  • อย่านำส่วนที่มีลายเซ็นไปรวมกับส่วนที่ไม่มีลายเซ็น

ราคา

เมื่อเปิดใช้การคิด ราคาการตอบกลับคือผลรวมของโทเค็นเอาต์พุตและโทเค็นการคิด คุณดูจำนวนโทเค็นการคิดทั้งหมดที่สร้างขึ้นได้จากฟิลด์ thoughtsTokenCount

Python

# ...
print("Thoughts tokens:",response.usage_metadata.thoughts_token_count)
print("Output tokens:",response.usage_metadata.candidates_token_count)

JavaScript

// ...
console.log(`Thoughts tokens: ${response.usageMetadata.thoughtsTokenCount}`);
console.log(`Output tokens: ${response.usageMetadata.candidatesTokenCount}`);

Go

// ...
usageMetadata, err := json.MarshalIndent(response.UsageMetadata, "", "  ")
if err != nil {
  log.Fatal(err)
}
fmt.Println("Thoughts tokens:", string(usageMetadata.thoughts_token_count))
fmt.Println("Output tokens:", string(usageMetadata.candidates_token_count))

โมเดลการคิดจะสร้างความคิดที่สมบูรณ์เพื่อปรับปรุงคุณภาพของคำตอบสุดท้าย จากนั้นจะแสดงข้อมูลสรุปเพื่อให้ข้อมูลเชิงลึกเกี่ยวกับ กระบวนการคิด ดังนั้น ราคาจึงอิงตามโทเค็นความคิดทั้งหมดที่โมเดลต้องสร้างเพื่อสร้างข้อมูลสรุป แม้ว่าจะมีเพียงข้อมูลสรุปเท่านั้นที่ส่งออกจาก API

ดูข้อมูลเพิ่มเติมเกี่ยวกับโทเค็นได้ในคำแนะนำการนับโทเค็น

แนวทางปฏิบัติแนะนำ

ส่วนนี้มีคำแนะนำบางอย่างสำหรับการใช้โมเดลการคิดอย่างมีประสิทธิภาพ เช่นเคย การทำตามคำแนะนำในการพรอมต์และแนวทางปฏิบัติแนะนำจะช่วยให้คุณได้รับผลลัพธ์ที่ดีที่สุด

การแก้ไขข้อบกพร่องและการควบคุม

  • ตรวจสอบการให้เหตุผล: เมื่อไม่ได้รับคำตอบที่คาดหวังจากโมเดลการคิด การวิเคราะห์สรุปความคิดของ Gemini อย่างละเอียดจะช่วยได้ คุณสามารถดูวิธีที่โมเดลแบ่งงานและสรุปผล รวมถึงใช้ข้อมูลดังกล่าวเพื่อแก้ไขให้ได้ผลลัพธ์ที่ถูกต้อง

  • ให้คำแนะนำในการให้เหตุผล: หากต้องการผลลัพธ์ที่ยาวเป็นพิเศษ คุณอาจต้องให้คำแนะนำในพรอมต์เพื่อจำกัดปริมาณการคิดที่โมเดลใช้ ซึ่งช่วยให้คุณสงวนเอาต์พุตโทเค็นไว้สำหรับการตอบกลับได้มากขึ้น

ความซับซ้อนของงาน

  • งานง่ายๆ (อาจปิดการคิด): สำหรับคำขอที่ตรงไปตรงมาซึ่งไม่จำเป็นต้องใช้การให้เหตุผลที่ซับซ้อน เช่น การดึงข้อมูลข้อเท็จจริงหรือการจัดประเภท ระบบจะไม่จำเป็นต้องใช้การคิด ตัวอย่างเช่น
    • "DeepMind ก่อตั้งขึ้นที่ไหน"
    • "อีเมลนี้ขอให้มีการประชุมหรือเพียงแค่ให้ข้อมูล"
  • งานระดับกลาง (ค่าเริ่มต้น/ต้องใช้ความคิด): คำขอทั่วไปจำนวนมากจะได้รับประโยชน์จาก การประมวลผลแบบทีละขั้นตอนหรือความเข้าใจที่ลึกซึ้งยิ่งขึ้น Gemini สามารถใช้ความสามารถในการคิดได้อย่างยืดหยุ่น สำหรับงานต่างๆ เช่น
    • เปรียบเทียบการสังเคราะห์แสงกับการเติบโต
    • เปรียบเทียบรถยนต์ไฟฟ้าและรถยนต์ไฮบริด
  • งานยาก (ความสามารถในการคิดสูงสุด): สำหรับความท้าทายที่ซับซ้อนอย่างแท้จริง เช่น การแก้โจทย์คณิตศาสตร์ที่ซับซ้อนหรืองานเขียนโค้ด เราขอแนะนำให้ตั้งค่า งบประมาณการคิดสูง งานประเภทนี้กำหนดให้โมเดลต้องใช้ความสามารถในการให้เหตุผลและการวางแผนอย่างเต็มที่ ซึ่งมักเกี่ยวข้องกับขั้นตอนภายในหลายขั้นตอนก่อนที่จะให้คำตอบ ตัวอย่างเช่น
    • แก้โจทย์ข้อ 1 ใน AIME 2025: หาผลรวมของฐานจำนวนเต็ม b ทั้งหมดที่มากกว่า 9 ซึ่ง 17b เป็นตัวหารของ 97b
    • เขียนโค้ด Python สำหรับเว็บแอปพลิเคชันที่แสดงข้อมูลตลาดหุ้นแบบเรียลไทม์ รวมถึงการตรวจสอบสิทธิ์ของผู้ใช้ ทำให้มีประสิทธิภาพมากที่สุด เท่าที่จะเป็นไปได้

โมเดล เครื่องมือ และความสามารถที่รองรับ

โมเดลซีรีส์ 3 และ 2.5 ทั้งหมดรองรับฟีเจอร์การคิด คุณดูความสามารถทั้งหมดของโมเดลได้ในหน้าภาพรวมของโมเดล

โมเดลการคิดใช้ได้กับเครื่องมือและความสามารถทั้งหมดของ Gemini ซึ่งช่วยให้โมเดลโต้ตอบกับระบบภายนอก รันโค้ด หรือเข้าถึงข้อมูลแบบเรียลไทม์ได้ โดยรวมผลลัพธ์ไว้ในการให้เหตุผลและคำตอบสุดท้าย

คุณลองดูตัวอย่างการใช้เครื่องมือกับโมเดลการคิดได้ใน ตำราการคิด

ขั้นตอนต่อไปคืออะไร