def __init__(self, host, port, timeoutSeconds=180):
self._mock_intent = distutils.util.strtobool(
os.getenv("MYRA_MOCK_PREDICT_INTENT", "0"))
if self._mock_intent:
return
self.host = host
self.port = port
self.session = requests.session()
self.server = "http://%s:%s" % (host, port)
self.timeoutSeconds = timeoutSeconds
评论列表
文章目录