philmui commited on
Commit
7c6adb7
·
1 Parent(s): f2f63e5

added sales & chinook exception log

Browse files
Files changed (1) hide show
  1. agents.py +4 -2
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