mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-30 16:40:05 +08:00
Updating task schema according to backend
This commit is contained in:
@@ -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 },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user