(context, cypher) = cypher_step.run(message)
if not cypher or len(cypher) == 0:
return {
"question": message,
"response": "I am sorry, I could not find the answer to your question",
"context": None,
"cypher": None
}
qa_step = QAStep(
chat_session=self.qa_chat_session,
qa_prompt=self.qa_prompt,
)
answer = qa_step.run(message, cypher, context)
self.last_answer = answer
return {
"question": message,
"response": answer,
"context": context,
"cypher": cypher
}