Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/main/java/com/kwcapstone/Service/ConferenceService.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,22 @@ public void saveProject(PrincipalDetails principalDetails, SaveProjectRequestDto

//summary
String summaryText = gptService.callSummaryOpenAI(scriptText);

ObjectMapper summaryMapper = new ObjectMapper();
JsonNode summaryNode = summaryMapper.readTree(summaryText);

String title = summaryNode.path("title").asText("");
String content = summaryNode.path("content").asText("");

String formattedSummary = String.format("📍%s\n\n%s", title, content);

String summaryFileName = "summary/" + projectId + ".txt";
File summaryFile = createTempTextFile(summaryText);
File summaryFile = createTempTextFile(formattedSummary);
s3Service.uploadFileToS3(summaryFileName, summaryFile);
//
// String summaryFileName = "summary/" + projectId + ".txt";
// File summaryFile = createTempTextFile(summaryText);
// s3Service.uploadFileToS3(summaryFileName, summaryFile);

//record
File recordFile = convertMultipartToFile(requestDto.getRecord());
Expand Down