From 6348da2de33004196651cfc34cac20ee21852ed6 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 8 Mar 2024 16:05:59 -0300 Subject: [PATCH] Refactor template formatting in records_to_text function --- src/backend/langflow/helpers/record.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/helpers/record.py b/src/backend/langflow/helpers/record.py index 214215800..d7b1d2b06 100644 --- a/src/backend/langflow/helpers/record.py +++ b/src/backend/langflow/helpers/record.py @@ -30,5 +30,5 @@ def records_to_text(template: str, records: list[Record]) -> str: records = [records] # Check if there are any format strings in the template - formated_records = [template.format(**record.data) for record in records] + formated_records = [template.format(data=record.data, **record.data) for record in records] return "\n".join(formated_records)