meet4150/ALIV_AI / app /tasks /ingestion_tasks.py
download
raw
592 Bytes
from __future__ import annotations
from pathlib import Path
from app.celery_app import celery_app
from app.ingestion.pipeline import IngestionOptions, ingest_file, ingest_text
@celery_app.task(name="aliveai.ingest_file")
def ingest_file_task(file_path: str, options: dict | None = None) -> dict:
opts = IngestionOptions.from_dict(options)
return ingest_file(Path(file_path), opts)
@celery_app.task(name="aliveai.ingest_text")
def ingest_text_task(text: str, options: dict | None = None) -> dict:
opts = IngestionOptions.from_dict(options)
return ingest_text(text, opts)

Xet Storage Details

Size:
592 Bytes
·
Xet hash:
b9caf67b4f83cdfff97b1126395039c733adaf5fd6136863dc99e6ae5e4caf80

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.