Spaces:
Paused
Paused
sharjeel1477
commited on
Commit
·
bf11981
1
Parent(s):
00cd58e
kk
Browse files
ask.py
CHANGED
@@ -54,6 +54,8 @@ def askQuestion(brain, question, prompt, temperature, maxTokens):
|
|
54 |
similarity_top_k=data_chunks, response_mode="compact",text_qa_template=QA_PROMPT)
|
55 |
print(question)
|
56 |
print(response)
|
|
|
|
|
57 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
58 |
memory.chat_memory.add_user_message(question)
|
59 |
memory.chat_memory.add_ai_message(response.response)
|
|
|
54 |
similarity_top_k=data_chunks, response_mode="compact",text_qa_template=QA_PROMPT)
|
55 |
print(question)
|
56 |
print(response)
|
57 |
+
if(response.response==None):
|
58 |
+
return response,False
|
59 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
60 |
memory.chat_memory.add_user_message(question)
|
61 |
memory.chat_memory.add_ai_message(response.response)
|