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 da7cb581..e6810dd7 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 @@ -34,7 +34,6 @@ public class GptService { private final RestTemplate restTemplate; private final GptScheduleParser gptScheduleParser; - private final S3ImageService s3ImageService; private final ScheduleService scheduleService; @Value("${api-key.chat-gpt}") @@ -59,8 +58,6 @@ public GptScheduleResponse getResponse(HttpEntity chatGptRequestHttp chatGptRequestHttpEntity, GptResponse.class); - Country country = scheduleService.validateCountry(destination); - String countryImage = country.getImageUrl(); List gptSchedules = gptScheduleParser.parseScheduleText(getScheduleText(responseEntity)); return new GptScheduleResponse(gptSchedules); @@ -83,7 +80,8 @@ public GptSchedulesResponse askQuestion(GptScheduleRequest questionRequestDTO) { .build() ); - String countryImage = s3ImageService.get(questionRequestDTO.getDestination()); + Country country = scheduleService.validateCountry(questionRequestDTO.getDestination()); + String countryImage = country.getImageUrl(); List schedules = new ArrayList<>(); for(int i = 0; i < 3; i++) { schedules.add(