Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
380333d
feat: 성공 이미지 백그라운드 생성 및 api 구축
Johyeonwoooooooo Feb 2, 2026
e75604b
chore: 이상형 이미지 생성 가중치 변경
Johyeonwoooooooo Feb 2, 2026
679a6f0
chore: 이상형 생성 가중치 변경
Johyeonwoooooooo Feb 2, 2026
69fbadd
[Feat]: 기본 이미지 업로드 및 챗봇 버튼 수정
RohEunSeo Feb 2, 2026
a493d01
Refactor PromptBuilder for gender and animal features
ChaerinKim12 Feb 2, 2026
330eabb
[Feat]: 여자 레퍼런스 이미지 변경
RohEunSeo Feb 2, 2026
d8215d9
chore: 이미지 경로 보내주는 api 방향잡기
Johyeonwoooooooo Feb 2, 2026
67ccd1f
fix: 충돌 해결
Johyeonwoooooooo Feb 2, 2026
5772b9a
feat: 주석처리
Johyeonwoooooooo Feb 2, 2026
6d4ff0d
피드백 UI 개선 및 챗봇 질문 로직 수정
AndyKim06 Feb 2, 2026
59608ee
Merge branch 'roh' of https://github.com/AndyKim06/DreamLove into roh
AndyKim06 Feb 2, 2026
c36298e
Refactor PromptBuilder for improved clarity and structure
ChaerinKim12 Feb 2, 2026
16ccc91
Refactor return values in promptBuilder.py
ChaerinKim12 Feb 2, 2026
2a8f2c6
[Feat]: 남자 레퍼런스 업로드
RohEunSeo Feb 2, 2026
be35aa0
[Feat]: imageGen수정
RohEunSeo Feb 2, 2026
f4fd484
[Feat]: 온보딩 페이지 구현
RohEunSeo Feb 3, 2026
f4c9a49
remove: CLI TEST 코드 삭제
Johyeonwoooooooo Feb 4, 2026
c378d9a
feat: 피드백 후 리스타트 리다이렉션 경로 수정
Johyeonwoooooooo Feb 4, 2026
b988194
feat: 채팅화면에서 사진 나올수 있게 수정
Johyeonwoooooooo Feb 4, 2026
cf5d599
챗봇 프롬프트 수정, 이상형이미지, 커플사진 연동
AndyKim06 Feb 4, 2026
44d5042
remove: 불필요한 사진 삭제
Johyeonwoooooooo Feb 4, 2026
dff3d60
chore: gitignore 추가
Johyeonwoooooooo Feb 4, 2026
0d6e4be
2번: 이상형 이미지 선택후 다음 버튼 누르도록
AndyKim06 Feb 4, 2026
afaa4ac
feat: 이미지 생성 체크 api 구현
Johyeonwoooooooo Feb 4, 2026
c75b2d5
[Feat]: 로딩 페이지 추가
RohEunSeo Feb 4, 2026
4e6440c
feat: 로딩창 연동
Johyeonwoooooooo Feb 4, 2026
fb858f5
피드백 페이지 개선 및 챗봇 대화 품질 향상
AndyKim06 Feb 5, 2026
b06474b
[Feat]: 외적 이상형 페이지 가이드라인 추가
RohEunSeo Feb 5, 2026
10aff0d
[Fix]: 챗봇 이상형 이미지 비율 수정
RohEunSeo Feb 6, 2026
cbbea41
챗봇 대화 로직 개선 및 UI 문구 수정
AndyKim06 Feb 6, 2026
ca781a1
[Feat]: 챗봇 로딩창 추가
RohEunSeo Feb 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ static/*
!static/.gitkeep

imageCloud/
**/imageCloud/
**/imageCloud/
frontend/assets/images/basic/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ python -m uvicorn app.main:app --reload
python interactive_cli.py
```

[http://localhost:8000/static/01-profile.html]
http://localhost:8000/static/00-onboarding.html

### 6. API 문서 확인 (Swagger UI)
서버가 실행 중일 때 브라우저에서 아래 주소로 접속하면 API 문서를 볼 수 있습니다.
- [http://localhost:8000/docs](http://localhost:8000/docs)
Expand Down
60 changes: 9 additions & 51 deletions app/core/config.py
Original file line number Diff line number Diff line change
@@ -1,87 +1,45 @@
"""

DreamLove 프로젝트 환경 설정 모듈

환경변수 관리 및 설정 클래스 정의

"""



from pydantic_settings import BaseSettings

from typing import Optional





class Settings(BaseSettings):

"""

애플리케이션 설정 클래스

.env 파일 또는 환경변수에서 값을 자동으로 로드

"""




# Solar API 설정

SOLAR_API_KEY: str = ""

SOLAR_API_URL: str = "https://api.upstage.ai/v1/solar/chat/completions"


SOLAR_API_URL: str = "https://api.upstage.ai/v1/chat/completions"

# Flux API 설정

FLUX_API_KEY: str = ""

FLUX_MODEL: str = "black-forest-labs/FLUX.1-schnell"




GEMINI_API_KEY: str

HF_TOKEN: str




# 애플리케이션 설정

APP_NAME: str = "DreamLove AI Chatbot"

APP_VERSION: str = "1.0.0"

DEBUG: bool = False



# CORS 설정

ALLOW_ORIGINS: list = ["http://127.0.0.1:8000", "http://localhost:8000",
"http://localhost:5501", "http://127.0.0.1:5501",

# CORS 설정``
ALLOW_ORIGINS: list = ["http://127.0.0.1:8000", "http://localhost:8000", "http://localhost:5501", "http://127.0.0.1:5501",
"http://localhost:5500", "http://127.0.0.1:5500"]






class Config:

env_file = ".env"

env_file_encoding = "utf-8"

case_sensitive = True





# 전역 설정 인스턴스 생성
settings = Settings()

settings = Settings()
2 changes: 2 additions & 0 deletions app/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ def getUserService():
def getImageGenService():
return ImageGenService(_repo)

def getUserRepository():
return _repo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 1 addition & 1 deletion app/models/userModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class User(BaseModel):
userCustom : bool
userIdealType : int
userLocation : str
userIdealImagePath : List[str]
userIdealImagePath : str
4 changes: 2 additions & 2 deletions app/routers/chatRouters.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
summary="연애 시뮬레이션 채팅",
description="사용자 정보와 이상형 정보를 기반으로 AI 챗봇과 연애 시뮬레이션 대화를 진행합니다."
)
async def simulate_chat(request: ChatRequest) -> ChatResponse:
async def simulate_chat(userId:str, request: ChatRequest) -> ChatResponse:
"""
연애 시뮬레이션 채팅 엔드포인트

Expand All @@ -37,7 +37,7 @@ async def simulate_chat(request: ChatRequest) -> ChatResponse:
"""
try:
# 대화 흐름 실행
response = await run_chat_flow(request)
response = await run_chat_flow(userId, request)
return response

except SolarAPIError as e:
Expand Down
14 changes: 13 additions & 1 deletion app/routers/imageRouters.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,16 @@ def get_test_image_qr():
path=tmp_file.name,
media_type="image/png",
filename="test_image_qr.png"
)
)

@router.get(
"/sucess",
summary="사용자가 선택한 요소를 가지고 이상형을 생성함",
)
def getSuccessImage( userId: str,
service: ImageGenService = Depends(getImageGenService),
):
image_paths = service.getSuccessResultImagePath(userId)
return {
"image": image_paths
}
33 changes: 32 additions & 1 deletion app/routers/userRouters.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,42 @@ def saveUserIdealType(idealType: int,
userId,
image_service
)

return result

def generate_expression_bg(
userId: str,
image_service: ImageGenService
):
image_service.generateExpressionService(userId)
image_service.generateCoupleImageService(userId)

@router.patch(
"/idealType",
summary="사용자의 이상형 선택 저장",
description="사용자가 선택한 이상형을 저장함."
)
def saveUserIdealType(idealType: int,
background_tasks: BackgroundTasks,
userId: str,
user_service: UserService = Depends(getUserService),
image_service: ImageGenService = Depends(getImageGenService),):
# 1️⃣ 이상형 저장
result = user_service.chooseIdealTypeService(userId, idealType)

# 2️⃣ 이미지 생성은 백그라운드로
background_tasks.add_task(
generate_expression_bg,
userId,
image_service
)
return result

@router.get(
"/checkImage",
summary="이미지 생성을 체크함",
description="사용자의 맞춤형 이상형이 생성되기를 기다림"
)
def checkImageGen(userId: str,
user_service: UserService = Depends(getUserService),):

return user_service.checkImageGenService(userId)
4 changes: 3 additions & 1 deletion app/schemas/chatSchemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class ChatRequest(BaseModel):
stage: int = Field(default=0, ge=0, le=6, description="현재 대화 단계 (0~6)")
current_score: int = Field(default=0, description="현재까지의 누적 점수")
negative_feedbacks: list[NegativeFeedbackItem] = Field(default=[], description="누적된 부정적 평가 내역")
conversation_history: list[dict] = Field(default=[], description="대화 히스토리 [{\"role\": \"assistant/user\", \"content\": \"...\"}]")


class ChatResponse(BaseModel):
Expand All @@ -68,5 +69,6 @@ class ChatResponse(BaseModel):
end: bool = Field(..., description="대화 종료 여부")
final_feedback: Optional[str] = Field(None, description="최종 피드백 (대화 종료 시)")
parsed_context: Optional[ParsedContext] = Field(None, description="추출된 컨텍스트 정보 (프론트엔드에서 저장 필요)")
ideal_image_base_path: Optional[str] = Field(None, description="이상형 이미지의 베이스 파일명 (예: standard_female_1)")
negative_feedbacks: list[NegativeFeedbackItem] = Field(default=[], description="갱신된 부정적 평가 내역")

conversation_history: list[dict] = Field(default=[], description="갱신된 대화 히스토리")
Loading