dialogflow cx v3 java library SessionsClient.detectIntend method: significant delays (over 3s)

 

Each time SessionsClient.detectIntent in the Dialogflow CX v3 library is executed, it encounters significant delays (over 3 seconds).

After creating a SessionsClient and configuring it to maintain sessions for 24 hours, I attempted to save the generated sessionsClient object itself or convert it to JSON and store it in Redis for reuse, but failedto do so.

Is there a way to store or reuse a SessionsClient created in a Java environment?

Alternatively, if there's a method to reduce the latency to within 1 second, I'd appreciate it.

 
0 2 128
2 REPLIES 2

For latency issues, there is no exact solution for this as it might come from various sources. I would suggest to follow these best practices in DialogFlow CX to help avoid high latency.

 

Alternative reference for almost same issue: https://www.googlecloudcommunity.com/gc/AI-ML/Dialogflow-CX-delay-in-returning-the-response-from-fin...

 

 

Thank you for your response. I'm encountering the following error when trying to convert SessionsClient to JSON for reuse. Can you suggest a solution?

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.google.api.gax.core.InstantiatingExecutorProvider$1 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)