RegGPT-Back-End / schema.py
theekshana's picture
Upload 30 files
395275a verified
raw
history blame
1.42 kB
"""
/*************************************************************************
*
* 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"
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