원 레포랑 완전 분리

This commit is contained in:
ai-cell-a100-1
2025-08-11 18:56:38 +09:00
commit 7217d3cbaa
86 changed files with 6631 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
from fastapi.responses import FileResponse
from config.setting import DEFAULT_PROMPT_PATH, STRUCTURED_PROMPT_PATH, STRUCTURED_SCHEMA_PATH
class DownloadService:
@staticmethod
def download_default_prompt():
return FileResponse(
DEFAULT_PROMPT_PATH,
media_type="text/plain",
filename="default_prompt.txt",
headers=DownloadService._no_cache_headers()
)
@staticmethod
def download_structured_prompt():
return FileResponse(
STRUCTURED_PROMPT_PATH,
media_type="text/plain",
filename="structured_prompt.txt",
headers=DownloadService._no_cache_headers()
)
@staticmethod
def download_structured_schema():
return FileResponse(
STRUCTURED_SCHEMA_PATH,
media_type="application/json",
filename="structured_schema.json",
headers=DownloadService._no_cache_headers()
)
@staticmethod
def _no_cache_headers():
return {
"Cache-Control": "no-store, no-cache, must-revalidate, max-age=0",
"Pragma": "no-cache",
"Expires": "0"
}