🚀 Add feature: Using MinIO as file storage for conversion both as input and output

This commit is contained in:
François Pelletier 2025-05-14 18:44:28 -04:00
parent afdfe1dbac
commit 579a3fe379
26 changed files with 16204 additions and 133 deletions

View file

@ -1,7 +1,6 @@
from typing import Annotated, Dict, List
from typing import Dict, List
from fastapi import Form, UploadFile
from pydantic import BaseModel, model_validator
from pydantic import BaseModel
class AnalysisRequest(BaseModel):
@ -24,30 +23,15 @@ class AvailableSourcesResponse(BaseModel):
class ConversionRequest(BaseModel):
source_name: Annotated[str, Form()]
source_format: Annotated[str, Form()]
file: UploadFile
def __init__(
self,
source_name: Annotated[str, Form()],
source_format: Annotated[str, Form()],
file: UploadFile,
):
super().__init__(
source_name=source_name, source_format=source_format, file=file
)
@model_validator(mode="after")
def validate(self):
if not self.source_format:
self.source_format = "txt"
return self
source_name: str
source_format: str
filename: str
class ConversionResponse(BaseModel):
converted_data: dict
status: str
metadata: dict
class ExportRequest(BaseModel):