Class PromptBuilder
java.lang.Object
com.mulesoft.modules.agent.broker.internal.prompt.PromptBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionPromptBuilder(org.mule.runtime.core.api.el.ExpressionManager expressionManager) -
Method Summary
Modifier and TypeMethodDescriptionbuild()setConversationHistory(String conversationHistory) Sets the conversation history.setCurrentLoopIteration(Integer currentLoopIteration) Sets the current loop iteration.setGroundings(String groundings) setMaxLoops(Integer maxLoops) Sets the maximum number of loops.setTools(Collection<Tool> tools) Sets the available toolssetUserInstructions(String userInstructions) setUserPrompt(String userPrompt) Sets the user prompt.
-
Constructor Details
-
PromptBuilder
public PromptBuilder(org.mule.runtime.core.api.el.ExpressionManager expressionManager)
-
-
Method Details
-
setUserPrompt
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
Sets the available tools- Parameters:
tools- the available tools- Returns:
- this PromptBuilder instance for method chaining
-
setConversationHistory
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
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
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
-
setUserInstructions
-
build
-
getUserPrompt
-
getGroundings
-
getUserInstructions
-