PublicDataWorks / verdad-frontend

MIT License
0 stars 0 forks source link

[Backend] Automate Label Creation and Assignment for Snippet Categorization #3

Closed linear[bot] closed 1 hour ago

linear[bot] commented 2 days ago

As a developer, I want to enhance the backend to support the "Upvotes" feature by implementing label assignment functionality, so that snippets can be accurately categorized based on disinformation categories identified by Gemini Pro.

Acceptance Criteria:

  1. After receiving disinformation_categories for a snippet from Gemini Pro:
    • Each category should be checked against the existing entries in the labels table.
    • If the category label does not exist, create a new entry in the labels table.
    • If the category label already exists, skip the creation step.
  2. For each label associated with the snippet:
    • Create a new record in the snippet_labels table to establish the relationship between the snippet and its labels.

Tasks:

Notes:

This story should guide the development process and ensure that all necessary components for the "Upvotes" feature are implemented correctly in the backend.

linear[bot] commented 2 days ago

VER-64 [Backend] Automate Label Creation and Assignment for Snippet Categorization