from libs import ROOT_PATH, preprocess,normalize, get_embedding_model from langchain_core.documents import Document from services import document_loader, RAGService, load_model from dotenv import load_dotenv from langchain_google_genai import ChatGoogleGenerativeAI load_dotenv() pdf_path = ROOT_PATH / "comp.pdf" # doc_obj = document_loader(filepath=pdf_path) # docu: Document = doc_obj.load() # print(docu) model = ChatGoogleGenerativeAI( model="gemini-2.5-flash" ) # model2 = load_model() obj = RAGService( model=model, collection_name="demo", persist_directory="./demo", embedding_model=get_embedding_model(), k = 5 ) # obj.delete_database() # obj.ingest(pdf_path) response = obj.db.similarity_search_with_score(query="core members of computer department") print(response)