feat: [additional] Notion 검색 기능 추가

- NotionService: Notion API 검색 + Gemini AI 답변
- AiConfig에 notion provider 추가
- 추가기능 > Notion 검색 채팅 UI
This commit is contained in:
김보곤
2026-02-22 23:04:16 +09:00
parent f8b0843763
commit aa3c9f4c3b
6 changed files with 600 additions and 33 deletions

View File

@@ -52,6 +52,7 @@ class AiConfig extends Model
'claude' => 'https://api.anthropic.com/v1',
'openai' => 'https://api.openai.com/v1',
'gcs' => 'https://storage.googleapis.com',
'notion' => 'https://api.notion.com/v1',
];
/**
@@ -62,12 +63,13 @@ class AiConfig extends Model
'claude' => 'claude-sonnet-4-20250514',
'openai' => 'gpt-4o',
'gcs' => '-',
'notion' => '2025-09-03',
];
/**
* AI Provider 목록 (GCS 제외)
*/
public const AI_PROVIDERS = ['gemini', 'claude', 'openai'];
public const AI_PROVIDERS = ['gemini', 'claude', 'openai', 'notion'];
/**
* 스토리지 Provider 목록
@@ -94,6 +96,16 @@ public static function getActiveClaude(): ?self
->first();
}
/**
* 활성화된 Notion 설정 조회
*/
public static function getActiveNotion(): ?self
{
return self::where('provider', 'notion')
->where('is_active', true)
->first();
}
/**
* Provider별 활성 설정 조회
*/
@@ -122,6 +134,7 @@ public function getProviderLabelAttribute(): string
'claude' => 'Anthropic Claude',
'openai' => 'OpenAI',
'gcs' => 'Google Cloud Storage',
'notion' => 'Notion',
default => $this->provider,
};
}
@@ -193,7 +206,7 @@ public function getMaskedApiKeyAttribute(): string
return $this->api_key;
}
return substr($this->api_key, 0, 8) . str_repeat('*', 8) . '...';
return substr($this->api_key, 0, 8).str_repeat('*', 8).'...';
}
/**
@@ -236,6 +249,7 @@ public function getAuthTypeLabelAttribute(): string
if ($this->isVertexAi()) {
return 'Vertex AI (서비스 계정)';
}
return 'API 키';
}
}