build

fun build(id: String, params: LLMParams = LLMParams(), clock: Clock = Clock.System, init: PromptBuilder.() -> Unit): Prompt(source)

Builds a Prompt object using the specified identifier, parameters, and initialization logic.

Return

The constructed Prompt object.

Parameters

id

The unique identifier for the Prompt being built.

params

The configuration parameters for the Prompt with a default value of LLMParams().

clock

The clock to use for generating timestamps, defaults to Clock.System.

init

The initialization logic applied to the PromptBuilder.


fun build(prompt: Prompt, clock: Clock = Clock.System, init: PromptBuilder.() -> Unit): Prompt(source)

Constructs a new Prompt instance by applying the provided initialization logic to a PromptBuilder.

Return

A new Prompt instance configured with the specified initialization logic.

Parameters

prompt

The base Prompt used for initializing the PromptBuilder.

clock

The clock to use for generating timestamps, defaults to Clock.System.

init

The initialization block applied to configure the PromptBuilder.