Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
stopmin committed Jul 16, 2024
2 parents 195144b + c3052c1 commit 36afb0b
Show file tree
Hide file tree
Showing 15 changed files with 745 additions and 339 deletions.
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ langchain-openai = "*"
langchain-google-community = "*"
wikipedia-api = "*"
plotly = "*"
implicit = "*"


[dev-packages]
flake8 = "*"
Expand Down
97 changes: 84 additions & 13 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from fastapi import FastAPI
from starlette.exceptions import HTTPException

from app.router.chatbot_article_detail_router import chatbot_article_router
from app.config.exception_handler import exception_handler, http_exception_handler
from app.config.middlewares.request_response_logging_middle_ware import (
LoggingMiddleware,
Expand Down Expand Up @@ -31,6 +32,7 @@ async def startup_event():
app.include_router(user_type_router)
app.include_router(simple_article_router)
app.include_router(send_email_service_router)
app.include_router(chatbot_article_router)

# exception handlers
app.add_exception_handler(Exception, exception_handler)
Expand Down
11 changes: 11 additions & 0 deletions app/model/recommend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from sqlalchemy import BigInteger, Column, ARRAY, Integer

from app.database.repository import Base


class Recommend(Base):
__tablename__ = "recommends"
__table_args__ = {"schema": "gyeongdan"}

classification_id = Column(BigInteger, primary_key=True, index=True)
recommend_article_ids = Column(ARRAY(Integer), nullable=True)
22 changes: 15 additions & 7 deletions app/model/user_type.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enum import Enum

from sqlalchemy import BigInteger, Column, Integer
from sqlalchemy import BigInteger, Column, Integer, CHAR

from app.database.repository import Base

Expand All @@ -15,12 +15,20 @@ class UserType(Base):
user_type_entertainer = Column(Integer, nullable=True)
user_type_tech_specialist = Column(Integer, nullable=True)
user_type_professionals = Column(Integer, nullable=True)
user_type = Column(CHAR(255), nullable=True)


class UserTypes(Enum):
NONE= -1
ISSUE_FINDER= 0
LIFESTYLE_CONSUMER= 1
ENTERTAINER= 2
TECH_SEPCIALIST= 3
PROFESSIONALS= 4
NONE= {'id':-1,
'name':'NONE'
}
ISSUE_FINDER= {'id':0,
'name':'ISSUE_FINDER'}
LIFESTYLE_CONSUMER= {'id':1,
'name':'LIFESTYLE_CONSUMER'}
ENTERTAINER= {'id':2,
'name':'ENTERTAINER'}
TECH_SPECIALIST= {'id':3,
'name':'TECH_SPECIALIST'}
PROFESSIONALS= {'id':4,
'name':'PROFESSIONALS'}
Loading

0 comments on commit 36afb0b

Please sign in to comment.