Hello,
I am trying to write a pre-logging script that redacts each transaction of a session from the logs.
So my goes is to make all inputs read “[Redacted input]” and all bot outputs read “[Redacted output]”.
I’ve used your resource here to get started and write the below code, but when I try to redact any input or output it does it on a word by word basis and not on the entire input/output.
// Remove input and response text
_.getDialogHistoryUtilities().replaceUserInputText(text -> text.replaceAll(".*", "[Redacted input]"));
_.getDialogHistoryUtilities().replaceResponseText(text -> text.replaceAll(".*", "[Redacted output]"));
Here is how it currently functions…
Input: Hello, my name is blah
Current redacted input: [Redacted input] [Redacted input] [Redacted input] [Redacted input] [Redacted input]
Desired redacted input: [Redacted input]
Could anyone please provide any help on how I can achieve the above desired redacted input/output.
Thank you in advance.