Spaces:
Sleeping
Sleeping
UPDATE: chat history
Browse files
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
|