|
from pydantic import BaseModel,EmailStr |
|
from typing import List, Optional |
|
|
|
|
|
|
|
|
|
|
|
|
|
class AddTextRequest(BaseModel): |
|
vectorstore: str |
|
text: str |
|
|
|
|
|
class AddWebsiteRequest(BaseModel): |
|
website_urls: List[str] |
|
vectorstore: str |
|
source: str |
|
|
|
|
|
class AnswerQueryRequest(BaseModel): |
|
query: str |
|
vectorstore: str |
|
llm_model: str = "llama3-70b-8192" |
|
|
|
class GetLinksRequest(BaseModel): |
|
url: str |
|
|
|
|
|
|
|
class WebsiteUrlTextExtractionRequest(BaseModel): |
|
url: str |
|
|
|
|
|
class WebsiteUrlTextExtractionListRequest(BaseModel): |
|
urls: List[str] |
|
|
|
|
|
class GetCurrentCountRequest(BaseModel): |
|
vectorstore: str |
|
|
|
|
|
class ListChatbotsRequest(BaseModel): |
|
username: str |
|
|
|
|
|
class GetChatHistoryRequest(BaseModel): |
|
vectorstore: str |
|
|
|
|
|
class ChatHistoryItem(BaseModel): |
|
timestamp: str |
|
question: str |
|
response: str |
|
|
|
|
|
class DeleteChatbotRequest(BaseModel): |
|
vectorstore: str |
|
|
|
|
|
class TrainChatbotRequest(BaseModel): |
|
vectorstore: str |
|
urls: list[str] |
|
|
|
|
|
class LoadPDFRequest(BaseModel): |
|
vectorstore: str |
|
|
|
|
|
class LoadEditedJson(BaseModel): |
|
vectorstore: str |
|
data_source_name: str |
|
source_endpoint: str |
|
json_data: dict |
|
|
|
|
|
class PublicPrivateCheckRequest(BaseModel): |
|
vectorstore: str |
|
mode: str | None = None |
|
|
|
|
|
class DeleteChatbotSourceRequest(BaseModel): |
|
vectorstore: str |
|
data_source_name: str |
|
|
|
|
|
|
|
|
|
class UserSignupRequest(BaseModel): |
|
username: str |
|
email:EmailStr |
|
password: str |
|
|
|
|
|
class UserSigninRequest(BaseModel): |
|
username:str |
|
email:EmailStr |
|
|
|
password: str |
|
|
|
|
|
class CheckSessionRequest(BaseModel): |
|
user_id: str |
|
|
|
|
|
class GetUserDataRequest(BaseModel): |
|
access_token: str |
|
|
|
|
|
class RefreshSessionRequest(BaseModel): |
|
refresh_token: str |
|
|
|
|
|
class LoginWithAccessTokenRequest(BaseModel): |
|
access_token: str |
|
refresh_token: str |
|
|
|
|
|
class UsernameCreationOauthRequest(BaseModel): |
|
username: str |
|
email: str |
|
user_id: str |
|
|
|
|
|
|
|
class SetSessionDataRequest(BaseModel): |
|
access_token: str |
|
refresh_token: str |
|
user_id: str |
|
|
|
|
|
class SignOutRequest(BaseModel): |
|
user_id: str |
|
|
|
|
|
class NewChatbotRequest(BaseModel): |
|
chatbot_name: str |
|
username: str |
|
|