rca_sqlagent / sql_agent.py
MukeshKapoor25's picture
Add initial project structure with environment configuration, README, and core functionality
5606ca5
raw
history blame contribute delete
502 Bytes
from agent_core import get_sql_agent
def main():
db_chain = get_sql_agent(verbose=True)
print("Welcome to the RCA SQL Agent! Type your question (or 'exit' to quit):")
while True:
user_input = input("\n> ")
if user_input.lower() in ("exit", "quit"):
break
try:
result = db_chain.invoke(user_input)
print("\nResult:\n", result)
except Exception as e:
print("Error:", e)
if __name__ == "__main__":
main()