GenerationConfigKt


public final class GenerationConfigKt


요약

공개 메서드

static final @NonNull GenerationConfig

DSL과 같은 방식으로 GenerationConfig를 구성하는 도우미 메서드입니다.

공개 메서드

generationConfig

public static final @NonNull GenerationConfig generationConfig(
    @ExtensionFunctionType @NonNull Function1<@NonNull GenerationConfig.BuilderUnit> init
)

DSL과 같은 방식으로 GenerationConfig를 구성하는 도우미 메서드입니다.

사용 예:

generationConfig {
context = context // required
workerExecutor = workerThread // Set the [ExecutorService] on which background tasks should be run. If no value is specified, a background thread pool will be used.
callbackExecutor = callbackExecutor // Set the [Executor] on which callbacks should be invoked. If no value is specified, callbacks will be invoked on the UI thread.
temperature = 0.75f
topK = 30
candidateCount = 4
maxOutputTokens = 300
}