java.lang.Object
com.mulesoft.modules.agent.broker.internal.prompt.PromptBuilder

public class PromptBuilder extends Object
  • Constructor Details

    • PromptBuilder

      public PromptBuilder(org.mule.runtime.core.api.el.ExpressionManager expressionManager)
  • Method Details

    • setUserPrompt

      public PromptBuilder setUserPrompt(String userPrompt)
      Sets the user prompt.
      Parameters:
      userPrompt - the user prompt to set
      Returns:
      this PromptBuilder instance for method chaining
      Throws:
      IllegalArgumentException - if userPrompt is null or empty
    • setTools

      public PromptBuilder setTools(Collection<Tool> tools)
      Sets the available tools
      Parameters:
      tools - the available tools
      Returns:
      this PromptBuilder instance for method chaining
    • setConversationHistory

      public PromptBuilder setConversationHistory(String conversationHistory)
      Sets the conversation history.
      Parameters:
      conversationHistory - the conversation history to set
      Returns:
      this PromptBuilder instance for method chaining
      Throws:
      IllegalArgumentException - if conversationHistory is null or empty
    • setCurrentLoopIteration

      public PromptBuilder setCurrentLoopIteration(Integer currentLoopIteration)
      Sets the current loop iteration.
      Parameters:
      currentLoopIteration - the current loop iteration to set
      Returns:
      this PromptBuilder instance for method chaining
      Throws:
      IllegalArgumentException - if currentLoopIteration is null or negative
    • setMaxLoops

      public PromptBuilder setMaxLoops(Integer maxLoops)
      Sets the maximum number of loops.
      Parameters:
      maxLoops - the maximum number of loops to set
      Returns:
      this PromptBuilder instance for method chaining
      Throws:
      IllegalArgumentException - if maxLoops is null or not positive
    • setGroundings

      public PromptBuilder setGroundings(String groundings)
    • setUserInstructions

      public PromptBuilder setUserInstructions(String userInstructions)
    • build

      public String build()
    • getUserPrompt

      public String getUserPrompt()
    • getGroundings

      public String getGroundings()
    • getUserInstructions

      public String getUserInstructions()