mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 12:36:23 +00:00
- Swagger UI를 Spring Boot 스타일(/swagger-ui.html)로 변경
- OpenAPI 스펙 개선 및 상세한 API 문서화
- 프론트엔드 연동을 위한 API-DOCUMENTATION.md 추가
- SSE 연결 예시 (JavaScript/React)
- 응답 스키마 및 TypeScript 인터페이스
- 동작 흐름 및 주의사항
- FastAPI 설정 파일(config.py) 추가
- API 엔드포인트:
- GET /api/v1/ai/suggestions/meetings/{meeting_id}/stream (SSE)
- GET /health (헬스 체크)
- GET /v3/api-docs (OpenAPI JSON)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
1.0 KiB
Python
48 lines
1.0 KiB
Python
"""환경 설정"""
|
|
from pydantic_settings import BaseSettings
|
|
from functools import lru_cache
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""애플리케이션 설정"""
|
|
|
|
# 서버 설정
|
|
app_name: str = "AI Service"
|
|
host: str = "0.0.0.0"
|
|
port: int = 8087
|
|
log_level: str = "INFO"
|
|
|
|
# Claude API
|
|
claude_api_key: str = ""
|
|
claude_model: str = "claude-3-5-sonnet-20241022"
|
|
claude_max_tokens: int = 2000
|
|
claude_temperature: float = 0.3
|
|
|
|
# Redis
|
|
redis_host: str = "20.249.177.114"
|
|
redis_port: int = 6379
|
|
redis_password: str = "Hi5Jessica!"
|
|
redis_db: int = 4
|
|
|
|
# Event Hub
|
|
eventhub_connection_string: str = ""
|
|
eventhub_name: str = "hgzero-eventhub-name"
|
|
eventhub_consumer_group: str = "$Default"
|
|
|
|
# AI 분석 설정
|
|
min_segments_for_analysis: int = 10
|
|
redis_ttl_seconds: int = 300 # 5분
|
|
|
|
# CORS
|
|
cors_origins: list = ["*"]
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = False
|
|
|
|
|
|
@lru_cache()
|
|
def get_settings() -> Settings:
|
|
"""설정 싱글톤"""
|
|
return Settings()
|