Files
Sheerka-Old/src/core/sheerka/services/SheerkaQuestion.py
T
2021-01-11 15:36:03 +01:00

22 lines
575 B
Python

from core.builtin_concepts import BuiltinConcepts
from core.concept import Concept
from core.sheerka.services.sheerka_service import BaseService
class SheerkaQuestion(BaseService):
NAME = "Question"
def __init__(self, sheerka):
super().__init__(sheerka)
def initialize(self):
self.sheerka.bind_service_method(self.is_question, False)
@staticmethod
def is_question(context):
"""
Returns True if a question is asked
:return:
"""
return context.in_context(BuiltinConcepts.EVAL_QUESTION_REQUESTED)