This commit is contained in:
@@ -82,6 +82,7 @@ type PreviewResponse struct {
|
||||
|
||||
type searchDebugSummary struct {
|
||||
Total int `json:"total"`
|
||||
VisibleCount int `json:"visibleCount,omitempty"`
|
||||
BySource map[string]int `json:"bySource"`
|
||||
WithPreview int `json:"withPreview"`
|
||||
WithThumbnail int `json:"withThumbnail"`
|
||||
@@ -477,16 +478,16 @@ func (a *App) searchMedia(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
merged := services.MergeRecommendations(recommended, scored, 20)
|
||||
merged := services.MergeRecommendations(recommended, scored, 16)
|
||||
if geminiErr != nil {
|
||||
merged = services.BackfillRecommendations(
|
||||
merged,
|
||||
scored,
|
||||
12,
|
||||
16,
|
||||
"Gemini 배치 일부가 실패해 미리보기 가능한 상위 후보를 보강했습니다.",
|
||||
)
|
||||
}
|
||||
merged = services.RandomizeTopRecommendations(merged, 8)
|
||||
merged = services.RandomizeTopRecommendations(merged, 6)
|
||||
for idx := range merged {
|
||||
merged[idx] = services.DecorateRecommendationMedia(merged[idx])
|
||||
}
|
||||
@@ -665,6 +666,7 @@ func summarizeSearchResults(results []services.SearchResult, duration time.Durat
|
||||
}
|
||||
return searchDebugSummary{
|
||||
Total: len(results),
|
||||
VisibleCount: len(results),
|
||||
BySource: bySource,
|
||||
WithPreview: withPreview,
|
||||
WithThumbnail: withThumbnail,
|
||||
@@ -717,6 +719,7 @@ func summarizeRecommendationResults(results []services.AIRecommendation, duratio
|
||||
}
|
||||
return searchDebugSummary{
|
||||
Total: len(results),
|
||||
VisibleCount: len(results),
|
||||
BySource: bySource,
|
||||
WithPreview: withPreview,
|
||||
WithThumbnail: withThumbnail,
|
||||
|
||||
Reference in New Issue
Block a user