KernelFunction.FromPromptBuilder<T> Interface
Type Parameters
- T
The type of the result of the function
public static interface KernelFunction.FromPromptBuilder<T>
Builder for creating a KernelFunction<T> from a prompt.
Method Summary
Method Details
withOutputVariable
public abstract KernelFunction.FromPromptBuilder withOutputVariable(OutputVariable outputVariable)
Set the output variable for the function.
Parameters:
Returns:
build
public abstract KernelFunction<T> build()
Create a new KernelFunction instance from the builder.
Returns:
withDefaultExecutionSettings
public abstract KernelFunction.FromPromptBuilder<T> withDefaultExecutionSettings(PromptExecutionSettings executionSettings)
Set the default execution settings for the function.
Parameters:
Returns:
withDescription
public abstract KernelFunction.FromPromptBuilder<T> withDescription(String description)
Set the description of the function.
Parameters:
Returns:
withExecutionSettings
public abstract KernelFunction.FromPromptBuilder<T> withExecutionSettings(Map<String,PromptExecutionSettings> executionSettings)
Set the execution settings for the function.
Parameters:
Returns:
withInputParameters
public abstract KernelFunction.FromPromptBuilder<T> withInputParameters(List<InputVariable> inputVariables)
Set the input parameters for the function.
Parameters:
Returns:
withName
public abstract KernelFunction.FromPromptBuilder<T> withName(String name)
Set the name of the function.
Parameters:
Returns:
withOutputVariable
public abstract KernelFunction.FromPromptBuilder<T> withOutputVariable(String description, String type)
Set the output variable for the function.
Parameters:
Returns:
withPromptTemplate
public abstract KernelFunction.FromPromptBuilder<T> withPromptTemplate(PromptTemplate promptTemplate)
Set the prompt template for the function.
Parameters:
Returns:
withPromptTemplateConfig
public abstract KernelFunction.FromPromptBuilder<T> withPromptTemplateConfig(PromptTemplateConfig promptTemplateConfig)
Set the prompt template config used to build the function.
Parameters:
Returns:
withPromptTemplateFactory
public abstract KernelFunction.FromPromptBuilder<T> withPromptTemplateFactory(PromptTemplateFactory promptTemplateFactory)
Set the prompt template factory used to build the function.
Parameters:
Returns:
withTemplate
public abstract KernelFunction.FromPromptBuilder<T> withTemplate(String template)
Set the template for the function.
Parameters:
Returns:
withTemplateFormat
public abstract KernelFunction.FromPromptBuilder<T> withTemplateFormat(String templateFormat)
Set the template format for the function.
Parameters:
Returns: