Object Creator
Deprecated
Use PromptRunner.Creating instead
Replace with
import com.embabel.agent.api.common.PromptRunner.Creating
PromptRunner.Creating<T>Interface to create objects of the given type from a prompt or messages. Allows setting strongly typed examples.
Functions
Create an object of the desired type from messages.
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.
Add an example of the desired output to the prompt. This will be included in JSON. It is possible to call this method multiple times. This will override PromptRunner.withGenerateExamples
Add multiple examples using vararg syntax. Each example will be added as a prompt contributor to improve LLM output quality.
Add multiple examples from a list or other iterable. Each example will be added as a prompt contributor to improve LLM output quality.
Exclude the given properties when creating an object.
Excludes the given properties when creating an object.
Disables validation of created objects.
Include the given properties when creating an object.
Includes the given properties when creating an object.
Add a filter that determines which properties are to be included when creating an object.
Set whether to validate created objects.