mirror of
https://github.com/hwanny1128/HGZero.git
synced 2026-06-13 01:19:11 +00:00
AI 서비스 Python 마이그레이션 및 프론트엔드 연동 문서 추가
주요 변경사항: - AI 서비스 Java → Python (FastAPI) 완전 마이그레이션 - 포트 변경: 8083 → 8086 - SSE 스트리밍 기능 구현 및 테스트 완료 - Claude API 연동 (claude-3-5-sonnet-20241022) - Redis 슬라이딩 윈도우 방식 텍스트 축적 - Azure Event Hub 연동 준비 (STT 텍스트 수신) 프론트엔드 연동 지원: - API 연동 가이드 업데이트 (Python 버전 반영) - Mock 데이터 개발 가이드 신규 작성 - STT 개발 완료 전까지 Mock 데이터로 UI 개발 가능 기술 스택: - Python 3.13 - FastAPI 0.104.1 - Anthropic Claude API 0.42.0 - Redis (asyncio) 5.0.1 - Azure Event Hub 5.11.4 - Pydantic 2.10.5 테스트 결과: - ✅ 서비스 시작 정상 - ✅ 헬스 체크 성공 - ✅ SSE 스트리밍 동작 확인 - ✅ Redis 연결 정상 다음 단계: - STT (Azure Speech) 서비스 연동 개발 - Event Hub를 통한 실시간 텍스트 수신 - E2E 통합 테스트 (STT → AI → Frontend) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
"""데이터 모델"""
|
||||
from .response import SimpleSuggestion, RealtimeSuggestionsResponse
|
||||
|
||||
__all__ = ["SimpleSuggestion", "RealtimeSuggestionsResponse"]
|
||||
@@ -0,0 +1,45 @@
|
||||
"""응답 모델"""
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import List
|
||||
|
||||
|
||||
class SimpleSuggestion(BaseModel):
|
||||
"""간소화된 AI 제안사항"""
|
||||
|
||||
id: str = Field(..., description="제안 ID")
|
||||
content: str = Field(..., description="제안 내용 (1-2문장)")
|
||||
timestamp: str = Field(..., description="타임스탬프 (HH:MM:SS)")
|
||||
confidence: float = Field(..., ge=0.0, le=1.0, description="신뢰도 (0-1)")
|
||||
|
||||
class Config:
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"id": "sugg-001",
|
||||
"content": "신제품의 타겟 고객층을 20-30대로 설정하고, 모바일 우선 전략을 취하기로 논의 중입니다.",
|
||||
"timestamp": "00:05:23",
|
||||
"confidence": 0.92
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class RealtimeSuggestionsResponse(BaseModel):
|
||||
"""실시간 AI 제안사항 응답"""
|
||||
|
||||
suggestions: List[SimpleSuggestion] = Field(
|
||||
default_factory=list,
|
||||
description="AI 제안사항 목록"
|
||||
)
|
||||
|
||||
class Config:
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"suggestions": [
|
||||
{
|
||||
"id": "sugg-001",
|
||||
"content": "신제품의 타겟 고객층을 20-30대로 설정하고...",
|
||||
"timestamp": "00:05:23",
|
||||
"confidence": 0.92
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user