withPrompt

abstract suspend fun withPrompt(block: Prompt.() -> Prompt)(source)

Updates the current AIAgentLLMContext with a new prompt and ensures thread-safe access using a read lock.

Parameters

prompt

The new Prompt to be set for the context.