Skip to content

Commit a654666

Browse files
committed
gemini 모델 변경
왜? 1.5 모델이 deprecated 되어 2.5로 변경
1 parent 77033ec commit a654666

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/scripts/auto_implementer.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import json
1010
import subprocess
1111
from pathlib import Path
12-
import google.generativeai as genai
12+
from google import genai
1313
from github import Github
1414

1515
# 환경 변수 읽기
@@ -20,8 +20,8 @@
2020
ISSUE_BODY = os.environ.get('ISSUE_BODY')
2121
REPOSITORY = os.environ.get('REPOSITORY')
2222

23-
# API 설정
24-
genai.configure(api_key=GEMINI_API_KEY)
23+
# API 클라이언트 생성
24+
client = genai.Client(api_key=GEMINI_API_KEY)
2525

2626
def read_project_context():
2727
"""프로젝트 컨텍스트 읽기 (CLAUDE.md)"""
@@ -42,8 +42,6 @@ def get_codebase_structure():
4242
def analyze_and_implement(issue_title, issue_body, project_context, structure):
4343
"""Gemini API를 사용하여 이슈 분석 및 구현"""
4444

45-
model = genai.GenerativeModel('gemini-1.5-flash')
46-
4745
prompt = f"""당신은 Android 개발 전문가입니다. NextRoom Android 프로젝트의 GitHub 이슈를 분석하고 구현해야 합니다.
4846
4947
# 프로젝트 정보
@@ -90,7 +88,10 @@ def analyze_and_implement(issue_title, issue_body, project_context, structure):
9088
"""
9189

9290
try:
93-
response = model.generate_content(prompt)
91+
response = client.models.generate_content(
92+
model='gemini-2.5-flash-lite',
93+
contents=prompt
94+
)
9495
response_text = response.text.strip()
9596

9697
# JSON 추출 (마크다운 코드 블록 제거)

.github/workflows/auto-implement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Install dependencies
3636
run: |
37-
pip install google-generativeai requests PyGithub
37+
pip install google-genai requests PyGithub
3838
3939
- name: Configure Git
4040
run: |

0 commit comments

Comments
 (0)