Skip to content

Commit

Permalink
fix chatpromptbuilder test
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Dec 17, 2024
1 parent 328cebd commit b88daae
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/components/builders/test_chat_prompt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"],
Expand Down

0 comments on commit b88daae

Please sign in to comment.