"""Module to save Hive Ai Image Task data.""" from typing import Any from assets.models import ( asset_final as asset_final_model, hive_ai_image_task as hive_ai_image_task_model, ) def save_hive_ai_image_task_data( asset_final_id: int, task_id: str, class_name: str, score_value: float ) -> dict[str, Any]: """Save hive ai image task data. Args: asset_final_id (int): Unique identifier of the final asset. task_id (str): Unique identifier for the Hive AI task. class_name (str): Classification label returned by Hive AI (e.g., 'violence'). score_value (float): Confidence score for the classification. Returns: dict[str, Any]: Dictionary representation of the created Hive AI image task. """ asset_final_model.get_asset_final_by_id(asset_final_id) return hive_ai_image_task_model.create_hive_ai_image_task( asset_final_id=asset_final_id, task_id=task_id, class_name=class_name, score_value=score_value, )