build

fun build(id: String, params: LLMParams = LLMParams(), 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().

init

The initialization logic applied to the PromptBuilder.


fun build(prompt: Prompt, 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.

init

The initialization block applied to configure the PromptBuilder.