Spaces:
Runtime error
Runtime error
File size: 502 Bytes
5606ca5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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()
|