s3 bucket integration for image storage
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user