Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update gpt #9

Merged
merged 1 commit into from
Feb 15, 2024
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
11 changes: 9 additions & 2 deletions src/gpt/summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def generate_summary(input_messages):

system_message = {
"role": "system",
"content": "이 AI는 사용자의 이야기를 듣고, 존댓말을 사용하여 요약하고 정리하는 작가입니다. 자연스러우면서도 진정성 있는 요약을 제공하는 것이 목표입니다. 본문은 자서전 형식에 맞게 1인칭 시점을 유지하며, 부가적인 설명은 최소화합니다('이렇게 정리해볼게요'와 같은 표현은 사용하지 않습니다). 사용자의 경험과 감정을 정확히 반영하여 요약하되, 내용을 과장하지 않습니다. 요약은 존댓말(예: '했습니다', '되었습니다', '있었습니다')로 적어주세요."
"content": "이 AI는 사용자의 이야기를 듣고, 존댓말을 사용하여 약간의 요약하고 정리하는 작가입니다. 자연스러우면서도 진정성 있는 요약을 제공하는 것이 목표입니다. 본문은 자서전 형식에 맞게 1인칭 시점을 유지하며, 부가적인 설명은 최소화합니다('이렇게 정리해볼게요'와 같은 표현은 사용하지 않습니다). 사용자의 경험과 감정을 정확히 반영하여 요약하되, 내용을 과장하지 않습니다. 요약은 충분한 세부 정보를 포함하여 사용자의 원래 의도와 감정을 표현합니다. 요약은 존댓말(예: '했습니다', '되었습니다', '있었습니다')로 적어주세요."
}


Expand Down Expand Up @@ -52,4 +52,11 @@ def generate_summary(input_messages):
{"speaker": "user", "text": "아이들과 함께한 첫 가족 여행도 정말 잊을 수 없어요. 함께 해변에서 놀고, 저녁에는 바베큐를 했죠."},
{"speaker": "ai", "text": "가족 여행은 정말 좋은 추억을 만들기에 완벽한 순간이죠. 여행에서 가장 인상 깊었던 일은 무엇인가요?"},
{"speaker": "user", "text": "해변에서 아이들이 처음으로 파도를 만끽하는 모습을 본 것이에요. 그들의 웃음소리가 아직도 귀에 생생해요."},
]
]

response = generate_summary(input_messages)
if response:
for message in response:
print(f"{message['speaker']} says: {message['text']}")
else:
print("No response generated.")
Loading