Skip to content

Commit

Permalink
[Backend : fix] 프롬프트 요청 추가사항 반영
Browse files Browse the repository at this point in the history
[Backend : fix] 프롬프트 요청 추가사항 반영
  • Loading branch information
yo0oni authored May 12, 2024
2 parents 5e5cf04 + 63f3f5b commit b5b864b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
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";
public static final Double TEMPERATURE = 0.6;
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:
Expand Down Expand Up @@ -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.""";
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
public class GptScheduleRequest {
private String destination;
private List<String> purpose;
private List<String> includedActivities;
private List<String> excludedActivities;
private String departureDate;
private String returnDate;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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())
);
}
}

0 comments on commit b5b864b

Please sign in to comment.