Update src/pdfchatbot.py
Browse files- src/pdfchatbot.py +5 -5
src/pdfchatbot.py
CHANGED
@@ -174,8 +174,8 @@ class PDFChatBot:
|
|
174 |
|
175 |
# Function to download conversation history
|
176 |
def download_chat_history(history,text):
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
174 |
|
175 |
# Function to download conversation history
|
176 |
def download_chat_history(history,text):
|
177 |
+
with open('chat_history.csv', 'w', newline='') as file:
|
178 |
+
writer = csv.writer(file)
|
179 |
+
writer.writerow(["User Input", "Bot Response"])
|
180 |
+
writer.writerows(chat_history)
|
181 |
+
return "chat_history.csv"
|