s3 bucket integration for image storage

This commit is contained in:
Adrien
2026-04-04 13:26:55 +02:00
parent 5acfdd33c1
commit b154e29f2d
9 changed files with 195 additions and 91 deletions
@@ -100,9 +100,9 @@ public class BookEmbeddingService {
// Step 4: For each figure, generate vision description and embed caption
for (FigureEntity figure : figures) {
Path imagePath = figureStorageService.resolve(figure.getImagePath());
byte[] imageBytes = figureStorageService.getBytes(figure.getImagePath());
String description = visionDescriptionService.describe(
imagePath, figure.getCaption());
imageBytes, figure.getCaption());
// Use description as caption fallback if no caption was detected
if (figure.getCaption() == null || figure.getCaption().isBlank()) {