Hammaad
code refactor part 1 complete need to test
93bc171
"""
/*************************************************************************
*
* CONFIDENTIAL
* __________________
*
* Copyright (2023-2025) AI Labs, IronOne Technologies, LLC
* All Rights Reserved
*
* Author : Theekshana Samaradiwakara
* Description :Python Backend API to chat with private data
* CreatedDate : 14/11/2023
* LastModifiedDate : 15/10/2024
*************************************************************************/
"""
from typing import Optional, List, Any, Dict
from pydantic import BaseModel
class LoginRequest(BaseModel):
username: str
password: str
# model for front end session
# Output model (UserModel response)
class UserModel(BaseModel):
userId: int
firstName: str
lastName: str
userName: str
token: str
class UserQuery(BaseModel):
# content: str
# userId: int
# aiModel: int = "default"
user_question: str
user_name: Optional[str] = "Default_User"
broker_name: Optional[str] = "Default_Broker"
class Document(BaseModel):
name: Optional[str]
page_content: str
metadata: Dict[str, Any]
class ResponseModel(BaseModel):
question: str
answer: str
source_documents: List[Document] = None
# class Feedback(BaseModel):
# """
# Schema for collecting feedback from the user.
# It includes the question, bot response, and user feedback.
# """
# question: str
# botResponse: str
# userFeedback: str
# feedback: str