diff --git a/taskweaver/memory/attachment.py b/taskweaver/memory/attachment.py index 080b93be..0ad2158d 100644 --- a/taskweaver/memory/attachment.py +++ b/taskweaver/memory/attachment.py @@ -46,7 +46,7 @@ class AttachmentType(Enum): # Misc invalid_response = "invalid_response" - # board infor + # board info board = "board" diff --git a/taskweaver/role/translator.py b/taskweaver/role/translator.py index bfb0f3ca..a7184d7a 100644 --- a/taskweaver/role/translator.py +++ b/taskweaver/role/translator.py @@ -155,6 +155,10 @@ def post_to_raw_text( :param ignored_types: :return: str """ + if ignored_types is None: + ignored_types = [] + ignored_types.append(AttachmentType.board) + structured_llm: List[Dict[str, str]] = [] for attachment in post.attachment_list: attachments_dict = {} diff --git a/tests/unit_tests/test_planner.py b/tests/unit_tests/test_planner.py index 4d9b5ce8..d0d38e1f 100644 --- a/tests/unit_tests/test_planner.py +++ b/tests/unit_tests/test_planner.py @@ -85,7 +85,12 @@ def test_compose_prompt(): message="Please load the data file /home/data.csv and count the rows of the loaded data", send_from="Planner", send_to="CodeInterpreter", - attachment_list=[], + attachment_list=[ + Attachment.create( + AttachmentType.board, + "1. load the data file\n2. count the rows of the loaded data \n", + ), + ], ) post2.add_attachment( Attachment.create(