withUpdatedParams

Creates a new instance of Prompt with updated parameters based on the modifications provided in the given update lambda. The update is applied to a mutable context representing the current LLM parameters, allowing selective modifications, which are then returned as a new set of parameters.

Return

A new Prompt instance with the updated parameters.

Parameters

update

A lambda function that receives an instance of LLMParamsUpdateContext, allowing modification of the current parameters such as temperature, speculation, schema, and tool choice.