Interface PromptRunner

  • All Implemented Interfaces:
    com.embabel.agent.api.common.PromptRunnerOperations , com.embabel.agent.core.ToolGroupConsumer , com.embabel.agent.spi.LlmUse , com.embabel.common.ai.prompt.PromptContributorConsumer

    
    public interface PromptRunner
     implements LlmUse, PromptRunnerOperations
                        

    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. Use the "with" methods to evolve the state to your desired configuration before executing createObject, generateText or other LLM invocation methods. Thus, a PromptRunner can be reused within an action implementation. A contextual facade to LlmOperations.