Updating task schema according to backend

This commit is contained in:
AbdBarho
2023-01-08 10:58:24 +01:00
parent fd9edf29d5
commit d4bf2be291
2 changed files with 2 additions and 3 deletions
@@ -10,6 +10,7 @@ export interface LabelPrompterReplyTask {
messages: Array<{
text: string;
is_assistant: boolean;
message_id: string;
}>;
};
}
@@ -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 },
];