GenerationConfig


public final class GenerationConfig


用于内容生成的配置参数。

摘要

嵌套类型

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

公共方法

final @NonNull Executor

应调用回调的 Executor

final Integer

要返回的唯一响应数量上限

final Context

要使用的应用上下文

final Integer

每个响应生成的词元数上限

final List<@NonNull String>
final Float

令牌选择的随机程度,通常介于 0 和 1 之间

final Integer

从概率最高的词元中选择多少个词元

final @NonNull ExecutorService

应在其上运行后台任务的 ExecutorService

公共方法

getCallbackExecutor

public final @NonNull Executor getCallbackExecutor()

应调用回调的 Executor

getCandidateCount

public final Integer getCandidateCount()

要返回的唯一响应数量上限

getContext

public final Context getContext()

要使用的应用上下文

getMaxOutputTokens

public final Integer getMaxOutputTokens()

每个响应生成的词元数上限

getStopSequence

public final List<@NonNull StringgetStopSequence()

getTemperature

public final Float getTemperature()

令牌选择的随机程度,通常介于 0 和 1 之间

getTopK

public final Integer getTopK()

从概率最高的词元中选择多少个词元

getWorkerExecutor

public final @NonNull ExecutorService getWorkerExecutor()

应在其上运行后台任务的 ExecutorService