File size: 527 Bytes
b5deaf1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""Module to run the mail collection process."""
from dotenv import load_dotenv
from controllers import mail
from chain import RAGChain
from retriever import DocRetriever

# load_dotenv()

if __name__ == "__main__":
    mail.collect()
    mail.get_documents()
    req = {
        "query": "What is the latest news on the stock market?",
    }
    chain = RAGChain(DocRetriever(req=req))
    result = chain.invoke({"input": req['query']},
                       config={"configurable": {"session_id": "abc"}})
    print(result)