diff --git a/backend/src/main/java/com/isp/backend/domain/gpt/dto/response/GptSchedulesResponse.java b/backend/src/main/java/com/isp/backend/domain/gpt/dto/response/GptSchedulesResponse.java index 52dadab1..0f6105b1 100644 --- a/backend/src/main/java/com/isp/backend/domain/gpt/dto/response/GptSchedulesResponse.java +++ b/backend/src/main/java/com/isp/backend/domain/gpt/dto/response/GptSchedulesResponse.java @@ -11,5 +11,6 @@ @AllArgsConstructor public class GptSchedulesResponse { private String countryImage; + private String currencyUnit; private List schedules; -} +} \ No newline at end of file diff --git a/backend/src/main/java/com/isp/backend/domain/gpt/service/GptService.java b/backend/src/main/java/com/isp/backend/domain/gpt/service/GptService.java index 21e4abde..8305168c 100644 --- a/backend/src/main/java/com/isp/backend/domain/gpt/service/GptService.java +++ b/backend/src/main/java/com/isp/backend/domain/gpt/service/GptService.java @@ -73,10 +73,12 @@ public CompletableFuture askQuestion(GptScheduleRequest qu sendRequestAsync(messages, executorService) ); + + CompletableFuture> combinedFuture = CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])) .thenApply(v -> futures.stream().map(CompletableFuture::join).collect(Collectors.toList())); - return combinedFuture.thenApply(schedules -> new GptSchedulesResponse(countryImage, schedules)); + return combinedFuture.thenApply(schedules -> new GptSchedulesResponse(countryImage, country.getCurrencyName(), schedules)); } private CompletableFuture sendRequestAsync(List messages, ExecutorService executor) {