Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ class Chatbot:
|
|
39 |
self.index = index
|
40 |
openai.api_key = api_key
|
41 |
self.chat_history = []
|
42 |
-
|
43 |
|
44 |
def generate_response(self, user_input):
|
45 |
query_engine = index.as_query_engine(llm=llm_predictor)
|
@@ -110,7 +110,7 @@ inputs = gr.components.Textbox(lines=7, label="Ask questions related to the cour
|
|
110 |
outputs = gr.components.Textbox(label="Response")
|
111 |
|
112 |
gr.Interface(fn=create_bot, inputs=inputs, outputs=outputs, title="Virtual TA",
|
113 |
-
description="This is a prototype of learning assistant designed for MIS 320 online section (Version 2.0). Powered by ChatGPT.\nNote: ChatGPT can make mistakes. Consider checking important information.",
|
114 |
theme="compact").launch(share=True)
|
115 |
|
116 |
|
|
|
39 |
self.index = index
|
40 |
openai.api_key = api_key
|
41 |
self.chat_history = []
|
42 |
+
self.history_file = f"./chat_log.json"
|
43 |
|
44 |
def generate_response(self, user_input):
|
45 |
query_engine = index.as_query_engine(llm=llm_predictor)
|
|
|
110 |
outputs = gr.components.Textbox(label="Response")
|
111 |
|
112 |
gr.Interface(fn=create_bot, inputs=inputs, outputs=outputs, title="Virtual TA",
|
113 |
+
description="This is a prototype of learning assistant designed for MIS 320 online section (Version 2.0). Powered by ChatGPT-4.\nNote: ChatGPT can make mistakes. Consider checking important information.",
|
114 |
theme="compact").launch(share=True)
|
115 |
|
116 |
|