williamagyapong commited on
Commit
d7a4e43
·
verified ·
1 Parent(s): 59ffcf8

Update utility.py

Browse files
Files changed (1) hide show
  1. utility.py +4 -3
utility.py CHANGED
@@ -281,12 +281,13 @@ def read_datalake(user_phone, user_question):
281
  sales_list = [doc.to_dict() for doc in sales_ref.stream()]
282
 
283
  inventory_df = pd.DataFrame(inventory_list)
 
284
  sales_df = pd.DataFrame(sales_list)
285
  # return f"{inventory_df} \n\n {sales_df}"
286
 
287
- # lake = SmartDatalake([inventory_df, sales_df], config={"llm": llm, "custom_whitelisted_dependencies":["ast"], "response_parser": FlaskResponse, "enable_cache": False, "save_logs": False})
288
- # response = lake.chat(user_question)
289
- response = inventory_df
290
 
291
  return response
292
 
 
281
  sales_list = [doc.to_dict() for doc in sales_ref.stream()]
282
 
283
  inventory_df = pd.DataFrame(inventory_list)
284
+ inventory_df = inventory_df[inventory_df.columns not in ['created_at', 'intent', 'transaction_type']]
285
  sales_df = pd.DataFrame(sales_list)
286
  # return f"{inventory_df} \n\n {sales_df}"
287
 
288
+ lake = SmartDatalake([inventory_df, sales_df], config={"llm": llm, "custom_whitelisted_dependencies":["ast"], "response_parser": FlaskResponse, "enable_cache": False, "save_logs": False})
289
+ response = lake.chat(user_question)
290
+ # response = inventory_df
291
 
292
  return response
293