mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 09:06: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>
59 lines
1.3 KiB
Python
59 lines
1.3 KiB
Python
"""AI Service FastAPI Application"""
|
|
import uvicorn
|
|
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from app.config import get_settings
|
|
from app.api.v1 import router as api_v1_router
|
|
import logging
|
|
|
|
# 로깅 설정
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
|
)
|
|
logger = logging.getLogger(__name__)
|
|
|
|
# Settings
|
|
settings = get_settings()
|
|
|
|
# FastAPI 앱 생성
|
|
app = FastAPI(
|
|
title=settings.app_name,
|
|
description="AI-powered meeting minutes analysis service",
|
|
version="1.0.0",
|
|
docs_url="/api/docs",
|
|
redoc_url="/api/redoc",
|
|
openapi_url="/api/openapi.json"
|
|
)
|
|
|
|
# CORS 미들웨어 설정
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=settings.cors_origins,
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
# API 라우터 등록
|
|
app.include_router(api_v1_router, prefix="/api/v1")
|
|
|
|
|
|
@app.get("/health")
|
|
async def health_check():
|
|
"""헬스 체크"""
|
|
return {
|
|
"status": "healthy",
|
|
"service": settings.app_name
|
|
}
|
|
|
|
|
|
if __name__ == "__main__":
|
|
uvicorn.run(
|
|
"main:app",
|
|
host=settings.host,
|
|
port=settings.port,
|
|
reload=True,
|
|
log_level=settings.log_level.lower()
|
|
)
|