Skip to content

순화 과정 AI 모델을 Gemini로 변경 (#183)#184

Merged
seungchan2022 merged 5 commits into
devfrom
feat/#183
Aug 26, 2025
Merged

순화 과정 AI 모델을 Gemini로 변경 (#183)#184
seungchan2022 merged 5 commits into
devfrom
feat/#183

Conversation

@seungchan2022

Copy link
Copy Markdown
Collaborator

🔍 PR Content

순화 과정을 Gpt 방식에서 Gemini를 이용한 방식으로 변경했습니다.

  • Gemini 관련 설정 및 로직 구현
  • Gpt를 사용했던 곳에서 Gemini로 변경

@seungchan2022 seungchan2022 linked an issue Aug 23, 2025 that may be closed by this pull request
2 tasks
Comment on lines +48 to +53
let content = """
\(systemPrompt)

<입력>
\(inputText)
</입력>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거는 system prompt, user prompt를 따로 넣지 않고 user prompt에 system prompt를 넣는 방식으로 하긴 해서 정확한 사용법은 아니지만, 최근 모델들은 user prompt에 system prompt를 넣어도 잘 해주더라고요! 그래서 문제는 아니지만 참고삼아 말씀드립니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다!! 한번 찾아 볼께요

@Ssunbell Ssunbell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alstjr7437 alstjr7437 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!! 리뷰 확인 추후에 한번 부탁드려요!

Comment on lines +5 to +14
static let shared = GeminiManger()

private let model: GenerativeModel?

init() {
let firebaseService = FirebaseAI.firebaseAI(backend: .googleAI())
model = firebaseService.generativeModel(
modelName: "gemini-2.5-flash",
systemInstruction: ModelContent(role: "system", parts: systemPrompt))
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 init으로 만들면 shared로 결국 싱글톤이 아니고 어디서든 생성이 가능한거 아닌가요?!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private을 붙혔어야 했는데, 빠트렸네요

Comment on lines +150 to +154
if #available(iOS 14.0, *) {
return AppAttestProvider(app: app)
} else {
return DeviceCheckProvider(app: app)
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 어짜피 17이상 버전이라 14 아래는 안해줘도 되지 않나요?!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정하겠습니다!!

@alstjr7437 alstjr7437 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

Comment on lines +21 to +24

let providerFactory = YourAppCheckProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분은 혹시 어떤 내용일까요?!

@seungchan2022 seungchan2022 Aug 26, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

승인되지 않은 클라이언트가 백엔드 리소스에 액세스하는 것을 방지하여 앱 백엔드를 악용으로부터 보호해 주기 위해 App Check를 추가해준 것 입니다.

아래 공식문서 첨부 하겠습니다.
App Check
App Attest

@seungchan2022 seungchan2022 merged commit 9f7d0a1 into dev Aug 26, 2025
1 check failed
@alstjr7437 alstjr7437 deleted the feat/#183 branch September 9, 2025 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

순화 과정 AI 모델을 Gemini로 변경

3 participants