Skip to main content

expand

Method
This is a method of the PromptExpanderAgent class in the prompt_expander_agent module.
Expand a prompt using the specified strategy. All operations go through an internal Agent which automatically handles tool calling when tools are provided. The agent decides when to use tools based on the prompt context.

Signature

def expand(prompt: str, strategy: ExpandStrategy, context: Optional[str]) -> ExpandResult

Parameters

prompt
str
required
The original user prompt
strategy
ExpandStrategy
default:"ExpandStrategy.AUTO"
Expansion strategy to use
context
Optional
Additional context to help with expansion

Returns

Returns
ExpandResult
ExpandResult containing the expanded prompt