diff --git a/src/backend/langflow/template/frontend_node/prompts.py b/src/backend/langflow/template/frontend_node/prompts.py index 830623a7e..7d7b1cde2 100644 --- a/src/backend/langflow/template/frontend_node/prompts.py +++ b/src/backend/langflow/template/frontend_node/prompts.py @@ -89,18 +89,18 @@ class ZeroShotPromptNode(BasePromptFrontendNode): is_list=False, show=True, multiline=True, - value=prompt.SUFFIX, - name="suffix", + value=prompt.FORMAT_INSTRUCTIONS, + name="format_instructions", ), TemplateField( field_type="str", - required=False, + required=True, placeholder="", is_list=False, show=True, multiline=True, - value=prompt.FORMAT_INSTRUCTIONS, - name="format_instructions", + value=prompt.SUFFIX, + name="suffix", ), ], ) @@ -109,3 +109,7 @@ class ZeroShotPromptNode(BasePromptFrontendNode): def to_dict(self): return super().to_dict() + + @staticmethod + def format_field(field: TemplateField, name: Optional[str] = None) -> None: + PromptFrontendNode.format_field(field, name) diff --git a/src/backend/langflow/utils/util.py b/src/backend/langflow/utils/util.py index af49856d7..0c9a18335 100644 --- a/src/backend/langflow/utils/util.py +++ b/src/backend/langflow/utils/util.py @@ -273,6 +273,7 @@ def format_dict(d, name: Optional[str] = None): "examples", "code", "headers", + "format_instructions", ] # Replace dict type with str