diff --git a/backend/src/main/java/com/isp/backend/domain/gpt/config/GptConfig.java b/backend/src/main/java/com/isp/backend/domain/gpt/config/GptConfig.java index 91de93cb..0ec99ac3 100644 --- a/backend/src/main/java/com/isp/backend/domain/gpt/config/GptConfig.java +++ b/backend/src/main/java/com/isp/backend/domain/gpt/config/GptConfig.java @@ -6,7 +6,7 @@ public class GptConfig { public static final String AUTHORIZATION = "Authorization"; public static final String BEARER = "Bearer "; - public static final String CHAT_MODEL = "gpt-3.5-turbo"; + public static final String CHAT_MODEL = "gpt-3.5-turbo-16k"; public static final Integer MAX_TOKEN = 3000; public static final Boolean STREAM = false; public static final String ROLE = "user"; @@ -14,14 +14,11 @@ public class GptConfig { public static final String MEDIA_TYPE = "application/json; charset=UTF-8"; public static final String CHAT_URL = "https://api.openai.com/v1/chat/completions"; public static final String PROMPT = """ - I would like you to plan a package tour program to plan your travel itinerary.Destination: %s - Departure date: %s - Entry date: %s - Purpose of travel: %s - The flight schedule is as follows. + I would like you to plan a package tour program to plan your travel itinerary. Also, plan your itinerary based on the travel distance and famous tourist destinations. - If possible, create the schedule in one-hour intervals. + If possible, please also provide the cost. + Also, be sure to include the name of the landmark or location. Make sure to plan for at least 10 hours of activity each day. I would like the format to be as follows: @@ -54,6 +51,14 @@ public class GptConfig { 6. Eat the dinner 7. shopping --- + + 여행지: %s + 이번 여행의 목적: %s + 여행에서 꼭 하고 싶은 활동: %s + 여행에서 제외하고 싶은 활동: %s + 한국에서 출국하는 날짜: %s + 한국에 귀국하는 날짜: %s + No need to say anything else, just plan your schedule right away. Please create the result in Korean."""; } \ No newline at end of file diff --git a/backend/src/main/java/com/isp/backend/domain/gpt/dto/request/GptScheduleRequest.java b/backend/src/main/java/com/isp/backend/domain/gpt/dto/request/GptScheduleRequest.java index f80f8a02..70e51901 100644 --- a/backend/src/main/java/com/isp/backend/domain/gpt/dto/request/GptScheduleRequest.java +++ b/backend/src/main/java/com/isp/backend/domain/gpt/dto/request/GptScheduleRequest.java @@ -12,6 +12,8 @@ public class GptScheduleRequest { private String destination; private List purpose; + private List includedActivities; + private List excludedActivities; private String departureDate; private String returnDate; } 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 853f9e7a..f4e3e0e6 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 @@ -94,9 +94,12 @@ public GptScheduleResponse askQuestion(GptScheduleRequest questionRequestDTO) { private String makeQuestion(GptScheduleRequest questionRequestDTO) { return String.format(GptConfig.PROMPT, questionRequestDTO.getDestination(), + questionRequestDTO.getPurpose(), + questionRequestDTO.getIncludedActivities(), + questionRequestDTO.getExcludedActivities(), questionRequestDTO.getDepartureDate(), questionRequestDTO.getReturnDate(), - String.join(ParsingConstants.COMMA, questionRequestDTO.getPurpose()) + String.join(ParsingConstants.COMMA, questionRequestDTO.getPurpose()) ); } } \ No newline at end of file