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
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ public class RAGAnswerCreateService {
// μ‹œμŠ€ν…œ μ—­ν•  μ„€μ •
private static final String SYSTEM_PROMPT = """
당신은 μ΄ˆλ“±ν•™μƒμ˜ 이해λ₯Ό λ•λŠ” μΉœμ ˆν•˜κ³  μ •ν™•ν•œ 지식 νŠœν„°μž…λ‹ˆλ‹€.
- μ•„λž˜ 제곡된 데이터λ₯Ό 기반으둜 μ§ˆλ¬Έμ— λŒ€ν•΄ 맀우 κΈΈκ³  μžμ„Έν•˜λ©° μ •ν™•ν•˜κ²Œ μ„€λͺ…ν•΄μ£Όμ„Έμš”.
- μ•„λž˜ 제곡된 데이터λ₯Ό 기반으둜 μ§ˆλ¬Έμ— λŒ€ν•΄ 맀우 κΈΈκ³  μžμ„Έν•˜κ²Œ μ„€λͺ…ν•΄μ£Όμ„Έμš”.
- λ§Œμ•½ μ°Έκ³  데이터가 μ—†λ‹€λ©΄, ꡐ윑 λ„λ©”μΈμ˜ 일반적인 지식을 λ°”νƒ•μœΌλ‘œ μΆ©μ‹€ν•˜κ²Œ λ‹΅λ³€ν•΄μ£Όμ„Έμš”.
- λ°˜λ“œμ‹œ ν•œκΈ€λ‘œλ§Œ μ‘λ‹΅ν•˜κ³ , μΈμ‚¬λ§μ΄λ‚˜ λΆˆν•„μš”ν•œ λ¬Έμž₯은 μƒλž΅ν•œ λŒ€λ‹΅λ§Œ λ°˜ν™˜ν•˜μ„Έμš”.
- μ΄ˆλ“±ν•™μƒλ„ 이해할 수 μžˆλ„λ‘ μš©μ–΄λ₯Ό ν’€μ–΄ μ“°κ³  μ˜ˆμ‹œλ₯Ό ν™œμš©ν•΄ μ„€λͺ…ν•΄μ£Όμ„Έμš”.
- /, \n λ“±μ˜ κ°œν–‰λ¬ΈμžλŠ” μ‚¬μš©ν•˜μ§€ λ§μ•„μ£Όμ„Έμš”.
""";

// κΈ°μ‘΄ μ±„νŒ… 이λ ₯을 기반으둜 GPT 응닡 생성
Expand All @@ -38,9 +39,9 @@ public String chat(List<Chatting> chatHistory, String question) {

// DTO 기반 μš”μ²­ 생성
ChatCompletionRequestDto request = ChatCompletionRequestDto.builder()
.model("gpt-4o") // 4o λͺ¨λΈ μ‚¬μš©
.temperature(0.5)
.maxTokens(700) // μΆ”ν›„ μ‘°μ • μ˜ˆμ •
.model("o1-preview")
.temperature(0.3)
.maxTokens(1500)
.messages(messages)
.build();

Expand Down