From eb4c41e3c6e89b15ad8205a99821f6e9d61e0714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6pf?= Date: Sat, 28 Jan 2023 20:23:39 +0100 Subject: [PATCH] send full conversation (including last-message) in label tasks --- backend/oasst_backend/tree_manager.py | 2 +- oasst-shared/oasst_shared/schemas/protocol.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/oasst_backend/tree_manager.py b/backend/oasst_backend/tree_manager.py index bcab02c3..1f0f1784 100644 --- a/backend/oasst_backend/tree_manager.py +++ b/backend/oasst_backend/tree_manager.py @@ -361,7 +361,7 @@ class TreeManager: random_reply_message = random.choice(replies_need_review) messages = self.pr.fetch_message_conversation(random_reply_message) - conversation = prepare_conversation(messages[:-1]) + conversation = prepare_conversation(messages) message = messages[-1] self.cfg.p_full_labeling_review_reply_prompter: float = 0.1 diff --git a/oasst-shared/oasst_shared/schemas/protocol.py b/oasst-shared/oasst_shared/schemas/protocol.py index cbb4d29c..4cdea856 100644 --- a/oasst-shared/oasst_shared/schemas/protocol.py +++ b/oasst-shared/oasst_shared/schemas/protocol.py @@ -258,7 +258,7 @@ class LabelConversationReplyTask(AbstractLabelTask): """A task to label a reply to a conversation.""" type: Literal["label_conversation_reply"] = "label_conversation_reply" - conversation: Conversation # the conversation so far + conversation: Conversation # the conversation so far (new: including the reply message) reply_message: Optional[ConversationMessage] reply: str