GenerationConfig


public final class GenerationConfig


พารามิเตอร์การกำหนดค่าที่จะใช้ในการสร้างเนื้อหา

สรุป

ประเภทที่ซ้อนกัน

public final class GenerationConfig.Builder
public static class GenerationConfig.Companion

เมธอดสาธารณะ

final @NonNull Executor

Executor ที่ควรเรียกใช้ Callback

final Integer

คำตอบที่ไม่ซ้ำกันสูงสุดที่จะแสดง

final Context

บริบทของแอปพลิเคชันที่จะใช้

final Integer

โทเค็นสูงสุดที่จะสร้างต่อคำตอบ

final Float

ระดับความสุ่มในการเลือกโทเค็น โดยปกติจะอยู่ระหว่าง 0 ถึง 1

final Integer

จำนวนโทเค็นที่จะเลือกจากโทเค็นที่มีความน่าจะเป็นสูงสุด

final @NonNull ExecutorService

ExecutorService ที่ควรเรียกใช้งานเบื้องหลัง

เมธอดสาธารณะ

getCallbackExecutor

public final @NonNull Executor getCallbackExecutor()

Executor ที่ควรเรียกใช้ Callback

getCandidateCount

public final Integer getCandidateCount()

คำตอบที่ไม่ซ้ำกันสูงสุดที่จะแสดง

getContext

public final Context getContext()

บริบทของแอปพลิเคชันที่จะใช้

getMaxOutputTokens

public final Integer getMaxOutputTokens()

โทเค็นสูงสุดที่จะสร้างต่อคำตอบ

getTemperature

public final Float getTemperature()

ระดับความสุ่มในการเลือกโทเค็น โดยปกติจะอยู่ระหว่าง 0 ถึง 1

getTopK

public final Integer getTopK()

จำนวนโทเค็นที่จะเลือกจากโทเค็นที่มีความน่าจะเป็นสูงสุด

getWorkerExecutor

public final @NonNull ExecutorService getWorkerExecutor()

ExecutorService ที่ควรเรียกใช้งานเบื้องหลัง