from pydantic.v1 import BaseModel from datetime import datetime class UserQuestion(BaseModel): question: str # TODO: create a HistoryInput data model with a chat_history and question attributes. class HistoryInput(BaseModel): question: str chat_history: str # TODO: let's create a UserRequest data model with a question and username attribute. # This will be used to parse the input request. class UserRequest(BaseModel): username: str question: str # TODO: implement MessageBase as a schema mapping from the database model to the # FastAPI data model. Basically MessageBase should have the same attributes as models.Message class MessageBase(BaseModel): # id: int message: str timestamp: datetime type: str user_id: int user: str # created additional class RagInput(BaseModel): standalone_question: str context: str