The current implementation parse everything that come and go from Unified-gateway.
We can enhance it by using serde_json::value::RawValue. This way, we can parse only part where we required to process it such as:
Partial input parameters, i.e. sessionId, message, sourceLang, targetLang. All other such as context, etc, shall not be parse but forward to necessary request.
WLT request/response
WA response textual part that may need to be translate if and only if sourceLang and targetLang is not equals. Otherwise, we don't need to parse it at all.
The current implementation parse everything that come and go from Unified-gateway. We can enhance it by using serde_json::value::RawValue. This way, we can parse only part where we required to process it such as:
sourceLang
andtargetLang
is not equals. Otherwise, we don't need to parse it at all.This is likely a breaking change to
wa
module.