I'm trying to integrate a chatbot on my Pepper robot using Dialogflow API. Everything works fine except the latency for getting responses from Dialogflow agent is very high (about 10 seconds to execute the following line according to my time log):
response = self.detect_intent_texts(project_id,session_id,question,language_code)
Also, there are warnings about this request:
/home/nao/.local/lib/python2.7/site-packages/urllib3/util/ssl_.py:365: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings SNIMissingWarning
/home/nao/.local/lib/python2.7/site-packages/urllib3/util/ssl_.py:149: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning
I'm not sure if this is related to the latency, but it seems that I need to update the python version of my Pepper (2.7.6 for now). However I don't know if the python version on Pepper is updatable or if everything will still work if I do update the python version.
Apart from this, do you have other ideas about reducing the latency?