mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 07:56:24 +00:00
✅ 구현 완료 - AI Python Service (FastAPI, Claude API, 8087 포트) - POST /api/v1/transcripts/consolidate - 참석자별 회의록 → AI 통합 분석 - 키워드/안건별 요약/Todo 추출 - Meeting Service AI 통합 - EndMeetingService (@Primary) - AIServiceClient (RestTemplate, 30초 timeout) - AI 분석 결과 저장 (meeting_analysis, todos) - 회의 상태 COMPLETED 처리 - DTO 구조 (간소화) - ConsolidateRequest/Response - MeetingEndDTO - Todo 제목만 포함 (담당자/마감일 제거) 📝 기술스택 - Python: FastAPI, anthropic 0.71.0, psycopg2 - Java: Spring Boot, RestTemplate - Claude: claude-3-5-sonnet-20241022 🔧 주요 이슈 해결 - 포트 충돌: 8086(feature/stt-ai) → 8087(feat/meeting-ai) - Bean 충돌: @Primary 추가 - YAML 문법: ai.service.url 구조 수정 - anthropic 라이브러리 업그레이드 📚 테스트 가이드 및 스크립트 작성 - claude/MEETING-AI-TEST-GUIDE.md - test-meeting-ai.sh 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
58 lines
1.6 KiB
Python
58 lines
1.6 KiB
Python
"""환경 설정"""
|
|
from pydantic_settings import BaseSettings
|
|
from functools import lru_cache
|
|
from typing import List
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""환경 설정 클래스"""
|
|
|
|
# 서버 설정
|
|
app_name: str = "AI Service (Python)"
|
|
host: str = "0.0.0.0"
|
|
port: int = 8087 # feature/stt-ai 브랜치 AI Service(8086)와 충돌 방지
|
|
|
|
# Claude API
|
|
claude_api_key: str = "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"
|
|
claude_model: str = "claude-3-5-sonnet-20241022"
|
|
claude_max_tokens: int = 250000
|
|
claude_temperature: float = 0.7
|
|
|
|
# Redis
|
|
redis_host: str = "20.249.177.114"
|
|
redis_port: int = 6379
|
|
redis_password: str = ""
|
|
redis_db: int = 4
|
|
|
|
# Azure Event Hub
|
|
eventhub_connection_string: str = "Endpoint=sb://hgzero-eventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=VUqZ9vFgu35E3c6RiUzoOGVUP8IZpFvlV+AEhC6sUpo="
|
|
eventhub_name: str = "hgzero-eventhub-name"
|
|
eventhub_consumer_group: str = "ai-transcript-group"
|
|
|
|
# CORS
|
|
cors_origins: List[str] = [
|
|
"http://localhost:8888",
|
|
"http://localhost:8080",
|
|
"http://localhost:3000",
|
|
"http://127.0.0.1:8888",
|
|
"http://127.0.0.1:8080",
|
|
"http://127.0.0.1:3000"
|
|
]
|
|
|
|
# 로깅
|
|
log_level: str = "INFO"
|
|
|
|
# 분석 임계값
|
|
min_segments_for_analysis: int = 10
|
|
text_retention_seconds: int = 300 # 5분
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = False
|
|
|
|
|
|
@lru_cache()
|
|
def get_settings() -> Settings:
|
|
"""싱글톤 설정 인스턴스"""
|
|
return Settings()
|