Skip to content

Commit

Permalink
Merge branch 'test_release' of https://github.com/microsoft/TaskWeaver
Browse files Browse the repository at this point in the history
…into test_release
  • Loading branch information
ShilinHe committed May 15, 2024
2 parents 36daff4 + 19fb40b commit 7d51b7c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion taskweaver/memory/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AttachmentType(Enum):
# Misc
invalid_response = "invalid_response"

# board infor
# board info
board = "board"


Expand Down
4 changes: 4 additions & 0 deletions taskweaver/role/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down
3 changes: 3 additions & 0 deletions taskweaver/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ def _send_message(recipient: str, post: Post) -> Post:
)
while True:
if post.send_to == "Planner":
# add the original message to the chat round
chat_round.add_post(post)
# create a reply post
reply_post = Post.create(
message=post.message,
send_from="Planner",
Expand Down
7 changes: 6 additions & 1 deletion tests/unit_tests/test_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <narrow depend on 1>\n",
),
],
)
post2.add_attachment(
Attachment.create(
Expand Down

0 comments on commit 7d51b7c

Please sign in to comment.