functionalStrategy
fun <Input, Output> functionalStrategy(name: String = "funStrategy", func: suspend AIAgentFunctionalContext.(input: Input) -> Output): AIAgentFunctionalStrategy<Input, Output>(source)
Creates an AIAgentFunctionalStrategy with the specified loop logic and name.
This function allows the definition of custom looping strategies for AI agents, where the provided logic defines how the agent processes input and produces output within its execution context.
Return
An instance of AIAgentFunctionalStrategy configured with the given loop logic and name.
Parameters
name
The name of the strategy, used to identify and describe the strategy. Defaults to "funStrategy".
func
A suspending function representing the loop logic of the strategy. It accepts an input of type Input and is executed within an AIAgentFunctionalContext, producing an output of type Output.