채팅면접에서 욕설 또는 공격적인 응답을 면접 progressCount를 업데이트하지 못하는 이슈 수정
생성형 ai 응답과정에서 exception이 떨어졌을 때 예외처리하지 못하는 이슈 수정
앱 localization 적용
앱 이름 및 permission 문구 localization 적용 / 영어 : Techtalk , 한국어 : 테크톡
면접 페이지 이탈 시 popScope가 정상 작동 안하는 이슈 수정
gradle버전 업데이트
🔍 상세
1. 프롬프트 로직 개선
final gemini = GenerativeModel(
model: 'gemini-1.5-pro-001',
apiKey: Flavor.env.geminiApiKey,
systemInstruction: Content.system(
'You are an interviewer, and the user is an applicant for a developer position. Please conduct the conversation naturally, as if you were an interviewer from a real company.',
),
safetySettings: safetySettings,
);
systemInstruction을 조정하여 조금 더 자연스러운 응답을 하도록 변경.
try {
gemini.generateContentStream(
[
Content.text('''
You will ask an interview question and verify the correctness of the user's answer.
The question is related to ${StoredTopics.getById(param.qna.qna.id.getFirstPartOfSpliited)}.
The question presented is: ${param.question}.
The correct answer is: ${param.qna.qna.answers.map((str) => '-$str').join(' ')}'
I answered: "${param.userAnswer}".
Based on the correct answer provided, determine whether response is correct by prefixing your response with "[c]" if it is correct, or "[w]" if it is incorrect.
Provide a technical explanation(don't ask additional question) of up to 120 characters regarding the correctness and quality of the answer.
If ${param.userAnswer} contains inappropriate or offensive content, respond with "[x]" indicating that the answer is unacceptable. Provide a brief explanation of why the answer is not suitable and how it should be appropriately addressed.
Please respond in the language corresponding to language code "${AppLocale.currentLocale.languageCode}".
'''),
],
욕설 또는 공격적인 응답을 할 경우 [x] 태그를 리턴하도록 변경. 기존에는 [i]태그를 리턴하였는데 initial 태그와 중복되어 사이드 이펙트가 발생됨.
유저의 답변에 기술적인 피드백을 하도록 변경
피드백을 진행할 때 추가 질문을 하지 않도록 변경. 다음 질문을 물어보기 전에 다시 올바른 답변을 하도록 요구하는 응답이 가끔 떨어질 때 있음 ex) 이러한 이유에서 틀렸습니다. 다시 설명해보세요.
피드백을 진행할 때 유저의 이름을 지칭하는 로직 제거. 항상 응답마다 유저의 이름을 지칭하는 flow가 어색하기 때문.
2. 생성형 ai 응답과정에서 exception이 떨어졌을 때 예외처리하지 못하는 이슈 수정
onError: (e) {
param.checkAnswer.call(answerState: AnswerState.error);
log('ai 응답 실패 : $e');
},
....
).onDone(() {
/// 응답이 종료된 이후
/// 1) Stream 닫기
/// 2) 응답 진행 상태 초기화
/// 3) 완료 콜백 메소드 실행
state = FeedbackProgress.init;
streamedFeedbackResponse.close().then((_) {
String? streamedRes = streamedFeedbackResponse.valueOrNull;
if (streamedRes == null) {
return;
} else {
return param.onFeedBackCompleted(
formatResponse(streamedFeedbackResponse.value),
);
}
});
});
ai stream 응답 과정에서 Exception이 떨어졌을 때 예외처리할 수 있는 로직 추가. Exception이 떨어지면 응답에 실패하기 전의 메세지 상태로 원복하고 팝업 다이어로그를 노출하여 유저에게 오류가 발생했음을 알려줌.
3. 생성형 ai 응답과정에서 exception이 떨어졌을 때 예외처리하지 못하는 이슈 수정
📝 변경 내용
🔍 상세
1. 프롬프트 로직 개선
systemInstruction을 조정하여 조금 더 자연스러운 응답을 하도록 변경.
2. 생성형 ai 응답과정에서 exception이 떨어졌을 때 예외처리하지 못하는 이슈 수정
3. 생성형 ai 응답과정에서 exception이 떨어졌을 때 예외처리하지 못하는 이슈 수정
👥 리뷰어
@Yellowtoast @yundal8755
📌 기타 사항