Question_And_Answer / chatbot.py
dschandra's picture
Create chatbot.py
7b76ad3 verified
raw
history blame
348 Bytes
from knowledge_base import get_answer_from_knowledge_base
def generate_answer(question):
# Here we are getting the answer from a knowledge base.
answer = get_answer_from_knowledge_base(question)
if answer:
return answer
else:
return "Sorry, I couldn't find an answer to that question. Please try again later."