mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-11 11:50:17 +08:00
Forwarding the real task id in backend interactions and ensure the labeling task works
This commit is contained in:
@@ -20,8 +20,8 @@ const handler = withoutRole("banned", async (req, res, token) => {
|
||||
// Accept the task so that we can complete it, this will probably go away soon.
|
||||
const registeredTask = await prisma.registeredTask.findUniqueOrThrow({ where: { id: frontendId } });
|
||||
const task = registeredTask.task as Prisma.JsonObject;
|
||||
const id = task.id as string;
|
||||
await oasstApiClient.ackTask(id, registeredTask.id);
|
||||
const taskId = task.id as string;
|
||||
await oasstApiClient.ackTask(taskId, registeredTask.id);
|
||||
|
||||
// Log the interaction locally to create our user_post_id needed by the Task
|
||||
// Backend.
|
||||
@@ -38,8 +38,9 @@ const handler = withoutRole("banned", async (req, res, token) => {
|
||||
|
||||
let newTask;
|
||||
try {
|
||||
newTask = await oasstApiClient.interactTask(update_type, frontendId, interaction.id, content, token);
|
||||
newTask = await oasstApiClient.interactTask(update_type, taskId, frontendId, interaction.id, content, token);
|
||||
} catch (err) {
|
||||
console.error(JSON.stringify(err));
|
||||
return res.status(500).json(err);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user