rewritePrompt

fun rewritePrompt(body: (prompt: Prompt) -> Prompt)(source)

Rewrites the current prompt by applying a transformation function.

Parameters

body

A lambda function that receives the current prompt and returns a modified prompt.