feat(ssulbox): SNS 업로드 제목·설명·태그 자동 생성
This commit is contained in:
1 parent
fb8febe462
commit
50dc7af5bc
7 files changed
+234
-6
No files matched your search
@@ -113,6 +113,32 @@ image_autotag_prompt = Prompt(
|
||||
prompt_output_class=ImageTagPromptOutput,
|
||||
)
|
||||
|
||||
@lru_cache()
|
||||
def get_ssul_upload_prompt() -> Prompt:
|
||||
"""썰박스 SNS 업로드 SEO 프롬프트 (시트: ssul_upload).
|
||||
|
||||
**lazy 로 만드는 이유**: 모듈 레벨 Prompt() 는 import 시점에 시트를 읽는다 —
|
||||
스프레드시트에 `ssul_upload` 시트가 아직 없으면 **앱 기동 자체가 죽는다.**
|
||||
lazy 면 시트가 없어도 앱은 살고, 썰박스 SEO 요청만 500 이 난다.
|
||||
(그래서 _preload_all_sheets 목록에도 넣지 않았다 — preload 는 실패를
|
||||
경고로 삼키지만, 이후 Prompt() 생성 시 worksheet() 폴백에서 죽는 건 같다)
|
||||
|
||||
ADO2(yt_upload)와 다른 프롬프트를 쓴다: 광고 영상 SEO 가 아니라
|
||||
병맛 역사 썰툰 톤의 제목·설명·태그를 만든다.
|
||||
템플릿 변수: {store_name} {region} {scenario_name}
|
||||
"""
|
||||
from app.utils.prompts.schemas import (
|
||||
SsulUploadPromptInput,
|
||||
SsulUploadPromptOutput,
|
||||
)
|
||||
|
||||
return Prompt(
|
||||
sheet_name="ssul_upload",
|
||||
prompt_input_class=SsulUploadPromptInput,
|
||||
prompt_output_class=SsulUploadPromptOutput,
|
||||
)
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def create_dynamic_subtitle_prompt(length: int, industry: str = "") -> Prompt:
|
||||
# industry 인자는 캐시 구분/하위 호환용. 시트는 단일 'subtitle'로 통합됨.
|
||||
|
||||
Reference in new issue
Block a user