From b88daaea0785660b1a05bf32608dd02616c42766 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Tue, 17 Dec 2024 10:51:08 +0100 Subject: [PATCH] fix chatpromptbuilder test --- .../builders/test_chat_prompt_builder.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/components/builders/test_chat_prompt_builder.py b/test/components/builders/test_chat_prompt_builder.py index f981afa1b3..a8fb8bc5b8 100644 --- a/test/components/builders/test_chat_prompt_builder.py +++ b/test/components/builders/test_chat_prompt_builder.py @@ -531,8 +531,13 @@ def test_to_dict(self): "type": "haystack.components.builders.chat_prompt_builder.ChatPromptBuilder", "init_parameters": { "template": [ - {"_content": [{"text": "text and {var}"}], "_role": "user", "_meta": {}}, - {"_content": [{"text": "content {required_var}"}], "_role": "assistant", "_meta": {}}, + {"_content": [{"text": "text and {var}"}], "_role": "user", "_meta": {}, "_name": None}, + { + "_content": [{"text": "content {required_var}"}], + "_role": "assistant", + "_meta": {}, + "_name": None, + }, ], "variables": ["var", "required_var"], "required_variables": ["required_var"], @@ -545,8 +550,13 @@ def test_from_dict(self): "type": "haystack.components.builders.chat_prompt_builder.ChatPromptBuilder", "init_parameters": { "template": [ - {"_content": [{"text": "text and {var}"}], "_role": "user", "_meta": {}}, - {"_content": [{"text": "content {required_var}"}], "_role": "assistant", "_meta": {}}, + {"_content": [{"text": "text and {var}"}], "_role": "user", "_meta": {}, "_name": None}, + { + "_content": [{"text": "content {required_var}"}], + "_role": "assistant", + "_meta": {}, + "_name": None, + }, ], "variables": ["var", "required_var"], "required_variables": ["required_var"],