fromPrompt

open fun fromPrompt(prompt: String): T

Create an object of the desired type using the given prompt and LLM options from context (process context or implementing class). Prompts are typically created within the scope of an @Action method that provides access to domain object instances, offering type safety.

Return

the created object of type T

Parameters

prompt

the prompt text to send to the LLM