Improve Vertex search result extraction
Some checks are pending
build-push / docker (push) Waiting to run

This commit is contained in:
AI Assistant
2026-03-12 16:55:42 +09:00
parent 5b53cc6e11
commit 6734887fc6
2 changed files with 65 additions and 9 deletions

View File

@@ -263,6 +263,10 @@ func (a *App) searchMedia(c *gin.Context) {
c.JSON(http.StatusBadGateway, gin.H{"error": err.Error()})
return
}
if len(results) == 0 {
c.JSON(http.StatusOK, gin.H{"results": []services.AIRecommendation{}, "warning": "Vertex AI Search returned no renderable results. Check your website indexing fields and thumbnails."})
return
}
recommended, err := a.GeminiService.Recommend(req.Query, results)
if err != nil {