In an Amazon Connect Contact Flow is there any support to handle this flow through an automated bidirectional stream?
There is a GetCustomerInput action. This action supports Lex integration through intents. The action waits for the Lex response with intent. With Lex intent handling, the only available support for custom processing is through a lambda in a non-bidirectional streaming fashion. When there are AI/LLM and automated write actions involved, the problem with this is that the caller gets a high perceived latency in processing the intent and leads to an overall less conversational, high latency, choppy experience.
Lex supports a streaming API, but requires creating an Asynchronous Lex client, starting the conversation with the client and a botResponseHandler
// Start a connection and pass in the publisher that streams the audio and process the responses from the bot.
System.out.println("step 5: starting the conversation ...");
CompletableFuture<Void> conversation = lexRuntimeServiceClient.startConversation(
startConversationRequest,
eventsPublisher,
botResponseHandler);
In Connect, is there support to leverage this bidirectional feature of lex, or to have a bidirectional stream directly with a kinesis firehose to process the get customer input action?