feat: 그날 코디 옷은 스냅에 태그된 무신사 상품만, 스타일 스냅을 더 받아 오고 후보 60개까지 봄(여성 스트릿 스냅 부족), buildPrompt 내보냄
This commit is contained in:
1 parent
7144084d8c
commit
ceacd5615b
3 files changed
+6
-5
No files matched your search
@@ -170,7 +170,7 @@ export async function pickSnaps({ band, style, outDir, pages = 2, log = console.
|
||||
const styleTags = STYLE_TAGS[style] ?? []
|
||||
const pool = new Map()
|
||||
const add = (list) => list.forEach((s) => s.goodsNos.length >= 3 && !pool.has(s.id) && pool.set(s.id, s))
|
||||
for (const tag of styleTags) add(await listSnaps({ tags: tag }, pages))
|
||||
for (const tag of styleTags) add(await listSnaps({ tags: tag }, pages * 3))
|
||||
for (const tag of rule.tags) add(await listSnaps({ tags: tag }, pages))
|
||||
for (const gender of ['WOMEN', 'MEN']) for (const kw of MATURE_KEYWORDS[gender]) add(await listSnaps({ keyword: kw }, 1))
|
||||
const hasStyle = (s) => styleTags.length === 0 || s.tags.some((t) => styleTags.some((st) => t.includes(st)))
|
||||
@@ -186,7 +186,7 @@ export async function pickSnaps({ band, style, outDir, pages = 2, log = console.
|
||||
const candidates = [...pool.values()]
|
||||
.filter((s) => s.gender === gender && !used.has(s.id))
|
||||
.sort((a, b) => Number(hasStyle(b)) - Number(hasStyle(a)) || score(b, persona) - score(a, persona))
|
||||
.slice(0, 25)
|
||||
.slice(0, 60)
|
||||
let best = null
|
||||
for (const c of candidates) {
|
||||
const full = c.goods ? c : await withGoods(c)
|
||||
|
||||
Reference in new issue
Block a user