Prompt Runner
User code should always use this interface to execute prompts. Typically obtained from an OperationContext or ActionContext parameter, via OperationContext.ai A PromptRunner is immutable once constructed, and has determined LLM and hyperparameters. Thus, a PromptRunner can be reused within an action implementation. A contextual facade to LlmOperations.
See also
Inheritors
Properties
Whether to generate examples for the prompt. Defaults to unknown: Set to false if generating your own examples.
Tool groups exposed. This will include directly registered tool groups and tool groups resolved from ToolGroups.
Additional objects with @Tool annotation for use in this PromptRunner
Functions
Create an object of the given type using the given prompt and LLM options from context (process context or implementing class). Prompts are typically created within the scope of an
Create an object from messages
Create an object of the given type
Generate text
Add a prompt contributor that can see context
Set whether to generate examples of the output in the prompt on a per-PromptRunner basis. This overrides platform defaults.
Add a list of handoffs to agents on this platform
Specify an LLM for the PromptRunner
Add a prompt contributor
Add varargs of prompt contributors and contextual prompt elements.
Add a list of subagents to hand off to.
Use operations from a given template
Allows for dynamic tool groups to be added to the PromptRunner.
Add a tool group to the PromptRunner
Add a tool object
Add a tool object to the prompt runner.
Add a set of tool groups to the PromptRunner