chore: [ai] Gemini 모델 gemini-2.0-flash → gemini-2.5-flash 마이그레이션

- config/services.php fallback 기본값 변경
- AiConfig DEFAULT_MODELS 상수 + getActiveGemini() fallback 변경
- NotionService fallback 변경
- AI 설정 관리 UI placeholder/기본값 변경
- Google Cloud AI 가이드 서비스 현황 모델명 변경
- 환경변수 관리 아카데미 예시 변경
This commit is contained in:
김보곤
2026-03-03 08:09:06 +09:00
parent 3c37050b30
commit 193cd2666f
6 changed files with 14 additions and 14 deletions

View File

@@ -59,7 +59,7 @@ class AiConfig extends Model
* Provider별 기본 모델 * Provider별 기본 모델
*/ */
public const DEFAULT_MODELS = [ public const DEFAULT_MODELS = [
'gemini' => 'gemini-2.0-flash', 'gemini' => 'gemini-2.5-flash',
'claude' => 'claude-sonnet-4-20250514', 'claude' => 'claude-sonnet-4-20250514',
'openai' => 'gpt-4o', 'openai' => 'gpt-4o',
'gcs' => '-', 'gcs' => '-',
@@ -94,7 +94,7 @@ public static function getActiveGemini(): ?self
$instance = new self; $instance = new self;
$instance->provider = 'gemini'; $instance->provider = 'gemini';
$instance->api_key = $apiKey; $instance->api_key = $apiKey;
$instance->model = config('services.gemini.model', 'gemini-2.0-flash'); $instance->model = config('services.gemini.model', 'gemini-2.5-flash');
$instance->base_url = config('services.gemini.base_url', 'https://generativelanguage.googleapis.com/v1beta'); $instance->base_url = config('services.gemini.base_url', 'https://generativelanguage.googleapis.com/v1beta');
$instance->is_active = true; $instance->is_active = true;
$instance->options = [ $instance->options = [

View File

@@ -109,7 +109,7 @@ public function searchWithAi(string $userMessage, array $history = []): array
} }
$geminiApiKey = $gemini->api_key; $geminiApiKey = $gemini->api_key;
$geminiModel = $gemini->model ?: 'gemini-2.0-flash'; $geminiModel = $gemini->model ?: 'gemini-2.5-flash';
$geminiBaseUrl = $gemini->base_url ?: 'https://generativelanguage.googleapis.com/v1beta'; $geminiBaseUrl = $gemini->base_url ?: 'https://generativelanguage.googleapis.com/v1beta';
// 대화 이력 텍스트 변환 // 대화 이력 텍스트 변환

View File

@@ -37,7 +37,7 @@
'gemini' => [ 'gemini' => [
'api_key' => env('GEMINI_API_KEY'), 'api_key' => env('GEMINI_API_KEY'),
'model' => env('GEMINI_MODEL', 'gemini-2.0-flash'), 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),
'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'), 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'),
'project_id' => env('GEMINI_PROJECT_ID', 'codebridge-chatbot'), 'project_id' => env('GEMINI_PROJECT_ID', 'codebridge-chatbot'),
], ],

View File

@@ -522,7 +522,7 @@ class="w-full rounded-xl cursor-pointer academy-img-hover"
<td class="p-2 border-b font-mono">GEMINI_MODEL</td> <td class="p-2 border-b font-mono">GEMINI_MODEL</td>
<td class="p-2 border-b text-center text-emerald-600">&#10003;</td> <td class="p-2 border-b text-center text-emerald-600">&#10003;</td>
<td class="p-2 border-b text-center text-emerald-600">&#10003;</td> <td class="p-2 border-b text-center text-emerald-600">&#10003;</td>
<td class="p-2 border-b text-gray-600">gemini-2.0-flash</td> <td class="p-2 border-b text-gray-600">gemini-2.5-flash</td>
</tr> </tr>
<tr> <tr>
<td class="p-2 border-b font-mono">VERTEX_AI_PROJECT_ID</td> <td class="p-2 border-b font-mono">VERTEX_AI_PROJECT_ID</td>

View File

@@ -142,8 +142,8 @@ class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-whi
['sam' => '회의록 자동 생성', 'api' => 'Speech-to-Text', 'model' => 'Chirp 2 / latest_long', 'status' => '운영중', 'file' => 'MeetingMinuteService'], ['sam' => '회의록 자동 생성', 'api' => 'Speech-to-Text', 'model' => 'Chirp 2 / latest_long', 'status' => '운영중', 'file' => 'MeetingMinuteService'],
['sam' => '음성 녹음 분석', 'api' => 'Speech-to-Text', 'model' => 'Chirp 2 + Gemini', 'status' => '운영중', 'file' => 'AiVoiceRecordingService'], ['sam' => '음성 녹음 분석', 'api' => 'Speech-to-Text', 'model' => 'Chirp 2 + Gemini', 'status' => '운영중', 'file' => 'AiVoiceRecordingService'],
['sam' => '상담 메모 음성 입력', 'api' => 'Speech-to-Text', 'model' => 'V1 latest_long', 'status' => '운영중', 'file' => 'GoogleCloudService'], ['sam' => '상담 메모 음성 입력', 'api' => 'Speech-to-Text', 'model' => 'V1 latest_long', 'status' => '운영중', 'file' => 'GoogleCloudService'],
['sam' => '재무 AI 리포트', 'api' => 'Vertex AI (Gemini)', 'model' => 'gemini-2.0-flash', 'status' => '운영중', 'file' => 'AiReportService (API)'], ['sam' => '재무 AI 리포트', 'api' => 'Vertex AI (Gemini)', 'model' => 'gemini-2.5-flash', 'status' => '운영중', 'file' => 'AiReportService (API)'],
['sam' => '명함 OCR', 'api' => 'Gemini API', 'model' => 'gemini-2.0-flash', 'status' => '운영중', 'file' => 'GeminiService'], ['sam' => '명함 OCR', 'api' => 'Gemini API', 'model' => 'gemini-2.5-flash', 'status' => '운영중', 'file' => 'GeminiService'],
['sam' => '오디오 백업/저장', 'api' => 'Cloud Storage', 'model' => 'Standard Class', 'status' => '운영중', 'file' => 'GoogleCloudStorageService'], ['sam' => '오디오 백업/저장', 'api' => 'Cloud Storage', 'model' => 'Standard Class', 'status' => '운영중', 'file' => 'GoogleCloudStorageService'],
['sam' => 'AI 설정 관리', 'api' => '—', 'model' => '다중 Provider', 'status' => '운영중', 'file' => 'AiConfig (Model)'], ['sam' => 'AI 설정 관리', 'api' => '—', 'model' => '다중 Provider', 'status' => '운영중', 'file' => 'AiConfig (Model)'],
['sam' => '토큰/비용 추적', 'api' => '—', 'model' => 'USD/KRW 환산', 'status' => '운영중', 'file' => 'AiTokenHelper'], ['sam' => '토큰/비용 추적', 'api' => '—', 'model' => 'USD/KRW 환산', 'status' => '운영중', 'file' => 'AiTokenHelper'],
@@ -407,7 +407,7 @@ class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-whi
<p class="text-xs text-gray-600 mb-3">테넌트의 비즈니스 데이터(지출, 매출, 매입, 입출금, 카드/계좌, 미수금) 자동 수집하여 일간/주간/월간 분석 리포트를 생성합니다.</p> <p class="text-xs text-gray-600 mb-3">테넌트의 비즈니스 데이터(지출, 매출, 매입, 입출금, 카드/계좌, 미수금) 자동 수집하여 일간/주간/월간 분석 리포트를 생성합니다.</p>
<div class="space-y-1 text-xs text-gray-500"> <div class="space-y-1 text-xs text-gray-500">
<div><strong>서비스:</strong> AiReportService (API 프로젝트)</div> <div><strong>서비스:</strong> AiReportService (API 프로젝트)</div>
<div><strong>모델:</strong> gemini-2.0-flash (Vertex AI)</div> <div><strong>모델:</strong> gemini-2.5-flash (Vertex AI)</div>
<div><strong>분석 영역:</strong> 지출, 매출, 매입, 입출금, 카드/계좌, 미수금</div> <div><strong>분석 영역:</strong> 지출, 매출, 매입, 입출금, 카드/계좌, 미수금</div>
<div><strong>API:</strong> <code class="px-1 bg-emerald-100 rounded">POST /v1/reports/ai/generate</code></div> <div><strong>API:</strong> <code class="px-1 bg-emerald-100 rounded">POST /v1/reports/ai/generate</code></div>
</div> </div>
@@ -422,7 +422,7 @@ class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-whi
<p class="text-xs text-gray-600 mb-3">STT로 변환된 회의 전문을 Gemini에 전달하여 핵심 내용, 결정 사항, 후속 조치 항목을 자동으로 요약합니다.</p> <p class="text-xs text-gray-600 mb-3">STT로 변환된 회의 전문을 Gemini에 전달하여 핵심 내용, 결정 사항, 후속 조치 항목을 자동으로 요약합니다.</p>
<div class="space-y-1 text-xs text-gray-500"> <div class="space-y-1 text-xs text-gray-500">
<div><strong>서비스:</strong> MeetingMinuteService (MNG)</div> <div><strong>서비스:</strong> MeetingMinuteService (MNG)</div>
<div><strong>모델:</strong> gemini-2.0-flash</div> <div><strong>모델:</strong> gemini-2.5-flash</div>
<div><strong>입력:</strong> 화자별 세그먼트 전체 텍스트</div> <div><strong>입력:</strong> 화자별 세그먼트 전체 텍스트</div>
<div><strong>출력:</strong> ai_summary 필드에 저장</div> <div><strong>출력:</strong> ai_summary 필드에 저장</div>
</div> </div>
@@ -463,7 +463,7 @@ class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-whi
<div class="font-medium text-gray-700 mb-1">비용 계산 흐름</div> <div class="font-medium text-gray-700 mb-1">비용 계산 흐름</div>
<div class="gai-code" style="font-size: 11px;">AiTokenHelper::record( <div class="gai-code" style="font-size: 11px;">AiTokenHelper::record(
provider: 'gemini', provider: 'gemini',
model: 'gemini-2.0-flash', model: 'gemini-2.5-flash',
menu: 'meeting-minutes', menu: 'meeting-minutes',
inputTokens: 1520, inputTokens: 1520,
outputTokens: 350, outputTokens: 350,
@@ -578,7 +578,7 @@ class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-whi
<div class="flex gap-4 mb-5" style="flex-wrap: wrap;"> <div class="flex gap-4 mb-5" style="flex-wrap: wrap;">
@php @php
$providers = [ $providers = [
['name' => 'Gemini', 'provider' => 'gemini', 'model' => 'gemini-2.0-flash', 'use' => '명함 OCR, 회의 요약, 음성 분석', 'color' => 'blue', 'auth' => 'Vertex AI / API Key'], ['name' => 'Gemini', 'provider' => 'gemini', 'model' => 'gemini-2.5-flash', 'use' => '명함 OCR, 회의 요약, 음성 분석', 'color' => 'blue', 'auth' => 'Vertex AI / API Key'],
['name' => 'Claude', 'provider' => 'claude', 'model' => 'claude-sonnet-4-20250514', 'use' => 'AI 재무 분석 (예비)', 'color' => 'purple', 'auth' => 'API Key'], ['name' => 'Claude', 'provider' => 'claude', 'model' => 'claude-sonnet-4-20250514', 'use' => 'AI 재무 분석 (예비)', 'color' => 'purple', 'auth' => 'API Key'],
['name' => 'OpenAI', 'provider' => 'openai', 'model' => 'gpt-4o', 'use' => '범용 AI (예비)', 'color' => 'green', 'auth' => 'API Key'], ['name' => 'OpenAI', 'provider' => 'openai', 'model' => 'gpt-4o', 'use' => '범용 AI (예비)', 'color' => 'green', 'auth' => 'API Key'],
['name' => 'GCS', 'provider' => 'gcs', 'model' => '—', 'use' => '음성 녹음 백업, 파일 저장', 'color' => 'cyan', 'auth' => 'Service Account'], ['name' => 'GCS', 'provider' => 'gcs', 'model' => '—', 'use' => '음성 녹음 백업, 파일 저장', 'color' => 'cyan', 'auth' => 'Service Account'],

View File

@@ -509,8 +509,8 @@
<div> <div>
<label class="block text-sm font-medium text-gray-700 mb-1">모델 <span class="text-red-500">*</span></label> <label class="block text-sm font-medium text-gray-700 mb-1">모델 <span class="text-red-500">*</span></label>
<input type="text" id="config-model" required placeholder="예: gemini-2.0-flash" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> <input type="text" id="config-model" required placeholder="예: gemini-2.5-flash" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<p class="mt-1 text-xs text-gray-500">기본값: <span id="default-model">gemini-2.0-flash</span></p> <p class="mt-1 text-xs text-gray-500">기본값: <span id="default-model">gemini-2.5-flash</span></p>
</div> </div>
<div id="base-url-section"> <div id="base-url-section">
@@ -578,7 +578,7 @@ function showToast(message, type = 'info') {
} }
const defaultModels = { const defaultModels = {
gemini: 'gemini-2.0-flash', gemini: 'gemini-2.5-flash',
claude: 'claude-sonnet-4-20250514', claude: 'claude-sonnet-4-20250514',
openai: 'gpt-4o' openai: 'gpt-4o'
}; };