From d4bf2be29151239a87bdc63121e93de95ce07d9f Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Sun, 8 Jan 2023 10:58:24 +0100 Subject: [PATCH] Updating task schema according to backend --- website/src/hooks/tasks/useLabelPrompterReply.ts | 1 + website/src/pages/label/label_prompter_reply.tsx | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/website/src/hooks/tasks/useLabelPrompterReply.ts b/website/src/hooks/tasks/useLabelPrompterReply.ts index 9b7a61da..f048c2b3 100644 --- a/website/src/hooks/tasks/useLabelPrompterReply.ts +++ b/website/src/hooks/tasks/useLabelPrompterReply.ts @@ -10,6 +10,7 @@ export interface LabelPrompterReplyTask { messages: Array<{ text: string; is_assistant: boolean; + message_id: string; }>; }; } diff --git a/website/src/pages/label/label_prompter_reply.tsx b/website/src/pages/label/label_prompter_reply.tsx index 81be8fc3..44606f47 100644 --- a/website/src/pages/label/label_prompter_reply.tsx +++ b/website/src/pages/label/label_prompter_reply.tsx @@ -17,9 +17,7 @@ const LabelPrompterReply = () => { const task = tasks[0].task; const messages: Message[] = [ - // TODO: could we re-use the task message_id as message id for all messages in the conversation? - // or should we ask the backend team to send message ids in the task? - ...task.conversation.messages.map((m) => ({ ...m, message_id: null })), + ...task.conversation.messages, { text: task.reply, is_assistant: false, message_id: task.message_id }, ];