Class PromptTemplateConfig.Builder

  • Enclosing class:
    PromptTemplateConfig

    public static class PromptTemplateConfig.Builder
    extends Object
    Builder for a prompt template config.
    • Method Detail

      • withName

        public PromptTemplateConfig.Builder withName​(String name)
        Set the name of the prompt template config.
        Parameters:
        name - The name of the prompt template config.
        Returns:
        this prompt template config.
      • addInputVariable

        public PromptTemplateConfig.Builder addInputVariable​(InputVariable inputVariable)
        Add an input variable to the prompt template config.
        Parameters:
        inputVariable - The input variable to add.
        Returns:
        this prompt template config.
      • withTemplate

        public PromptTemplateConfig.Builder withTemplate​(String template)
        Set the template of the prompt template config.
        Parameters:
        template - The template of the prompt template config.
        Returns:
        this prompt template config.
      • withDescription

        public PromptTemplateConfig.Builder withDescription​(String description)
        Set the description of the prompt template config.
        Parameters:
        description - The description of the prompt template config.
        Returns:
        this prompt template config.
      • withTemplateFormat

        public PromptTemplateConfig.Builder withTemplateFormat​(String templateFormat)
        Set the template format of the prompt template config.
        Parameters:
        templateFormat - The template format of the prompt template config.
        Returns:
        this prompt template config.
      • withInputVariables

        public PromptTemplateConfig.Builder withInputVariables​(List<InputVariable> inputVariables)
        Set the inputVariables of the prompt template config.
        Parameters:
        inputVariables - The input variables of the prompt template config.
        Returns:
        this prompt template config.
      • withOutputVariable

        public PromptTemplateConfig.Builder withOutputVariable​(OutputVariable<?> outputVariable)
        Set the output variable of the prompt template config.
        Parameters:
        outputVariable - The output variable of the prompt template config.
        Returns:
        this prompt template config.
      • withExecutionSettings

        public PromptTemplateConfig.Builder withExecutionSettings​(Map<String,​PromptExecutionSettings> executionSettings)
        Set the prompt execution settings of the prompt template config.
        Parameters:
        executionSettings - The prompt execution settings of the prompt template config.
        Returns:
        this prompt template config.
      • build

        public PromptTemplateConfig build()
        Build the prompt template config.
        Returns:
        The prompt template config.