added sales & chinook exception log
Browse files
agents.py
CHANGED
@@ -102,7 +102,8 @@ def salesAgent(instruction):
|
|
102 |
agent = load_sales_agent(verbose=True)
|
103 |
output = agent.run(instruction)
|
104 |
print("panda> " + output)
|
105 |
-
except:
|
|
|
106 |
output = "Please rephrase and try again for company sales data"
|
107 |
return output
|
108 |
|
@@ -112,6 +113,7 @@ def chinookAgent(instruction, model_name):
|
|
112 |
agent = load_sqlite_agent(model_name)
|
113 |
output = agent.run(instruction)
|
114 |
print("chinook> " + output)
|
115 |
-
except:
|
|
|
116 |
output = "Please rephrase and try again for digital media data"
|
117 |
return output
|
|
|
102 |
agent = load_sales_agent(verbose=True)
|
103 |
output = agent.run(instruction)
|
104 |
print("panda> " + output)
|
105 |
+
except Exception as e:
|
106 |
+
logger.error(e)
|
107 |
output = "Please rephrase and try again for company sales data"
|
108 |
return output
|
109 |
|
|
|
113 |
agent = load_sqlite_agent(model_name)
|
114 |
output = agent.run(instruction)
|
115 |
print("chinook> " + output)
|
116 |
+
except Exception as e:
|
117 |
+
logger.error(e)
|
118 |
output = "Please rephrase and try again for digital media data"
|
119 |
return output
|