From be77e85f432940ab4f0d65cceb67b59595ff9f96 Mon Sep 17 00:00:00 2001 From: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:44:45 +0200 Subject: [PATCH] Fix inaccuracy in PromptBuilder docstring (#7503) --- haystack/components/builders/prompt_builder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/haystack/components/builders/prompt_builder.py b/haystack/components/builders/prompt_builder.py index f78610b06..64b85d76a 100644 --- a/haystack/components/builders/prompt_builder.py +++ b/haystack/components/builders/prompt_builder.py @@ -9,7 +9,9 @@ from haystack import component, default_to_dict class PromptBuilder: """ PromptBuilder is a component that renders a prompt from a template string using Jinja2 templates. - The template variables found in the template string are used as input types for the component and are all required. + + The template variables found in the template string are used as input types for the component and are all optional. + If a template variable is not provided as an input, it will be replaced with an empty string in the rendered prompt. Usage example: ```python