Rauhan commited on
Commit
ebe1426
·
1 Parent(s): ad139ee

UPDATE: chat history

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -445,3 +445,10 @@ async def analyzeAndAnswer(query: str, file: UploadFile = File(...)):
445
  return {
446
  "output": "UNABLE TO ANSWER QUERY"
447
  }
 
 
 
 
 
 
 
 
445
  return {
446
  "output": "UNABLE TO ANSWER QUERY"
447
  }
448
+
449
+
450
+ @app.post("/getChatHistory")
451
+ async def chatHistory(vectorstore: str):
452
+ username, chatbotName = vectorstore.split("$")[1], vectorstore.split("$")[2]
453
+ response = supabase.table("ConversAI_ChatHistory").select("timestamp", "question", "response").eq("username", username).eq("chatbotName", chatbotName).execute().data
454
+ return response