File size: 737 Bytes
4984b90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from databot import DataBot # pyre-ignore[21]

def run_app():
    # Initialize the DataBot engine
    print("Connecting to dev_poly database...")
    bot = DataBot()
    
    print("Type 'exit' to close the assistant.\n")

    while True:
        user_query = input("You: ")
        
        if user_query.lower() in ['exit', 'quit', 'bye']:
            print("Shutting down DataBot. Goodbye!")
            break
        
        if not user_query.strip():
            continue

        # Get response from DataBot
        print("\nDataBot is thinking...")
        answer = bot.ask(user_query)
        
        print(f"\nAssistant: {answer}\n")
        print("-" * 20)

if __name__ == "__main__":
    run_app()