Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
|
| 2 |
# import logging
|
| 3 |
import os
|
| 4 |
-
os.environ['OPENAI_API_KEY'] =
|
|
|
|
| 5 |
import openai
|
| 6 |
import json
|
| 7 |
|
|
@@ -87,8 +88,7 @@ class Chatbot:
|
|
| 87 |
self.chat_history.append(message)
|
| 88 |
return message
|
| 89 |
|
| 90 |
-
def
|
| 91 |
-
load_chat_history(self, filename):
|
| 92 |
try:
|
| 93 |
with open(filename, 'r') as f:
|
| 94 |
self.chat_history = json.load(f)
|
|
|
|
| 1 |
|
| 2 |
# import logging
|
| 3 |
import os
|
| 4 |
+
os.environ['OPENAI_API_KEY'] =
|
| 5 |
+
"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"
|
| 6 |
import openai
|
| 7 |
import json
|
| 8 |
|
|
|
|
| 88 |
self.chat_history.append(message)
|
| 89 |
return message
|
| 90 |
|
| 91 |
+
def load_chat_history(self, filename):
|
|
|
|
| 92 |
try:
|
| 93 |
with open(filename, 'r') as f:
|
| 94 |
self.chat_history = json.load(f)
|