You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/action/MaskAction.java
+34-34Lines changed: 34 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,29 @@
56
56
*/
57
57
publicclassMaskActionimplementsAiTextAction {
58
58
59
+
privatestaticfinalStringRESPONSE_SCHEMA = """
60
+
{
61
+
"type": "object",
62
+
"properties": {
63
+
"text": {
64
+
"type": "string"
65
+
},
66
+
"maskMap": {
67
+
"type": "object",
68
+
"additionalProperties": {
69
+
"type": "string"
70
+
}
71
+
}
72
+
},
73
+
"required": ["text", "maskMap"]
74
+
}
75
+
""";
76
+
privatestaticfinalStringSYSTEM_PROMPT =
77
+
"You are a content redaction specialist. Detect and replace sensitive information in the given text with " +
78
+
"mask tokens. Increment the number suffix (_1, _2, ...) for each unique occurrence of the same type " +
79
+
"so every masking is unique. Respond with a JSON object with two fields: \"text\" (the redacted " +
80
+
"text) and \"maskMap\" (an object mapping each mask token to the original value it replaced).";
"You are a content redaction specialist. Detect and replace sensitive information in the given text with mask tokens. "
125
-
+ "Increment the number suffix (_1, _2, ...) for each unique occurrence of the same type so every masking is unique. "
126
-
+ "Respond with a JSON object with two fields: \"text\" (the redacted text) and \"maskMap\" (an object mapping each mask token to the original value it replaced).";
Copy file name to clipboardExpand all lines: server/libs/modules/components/ai/universal/universal-text/src/main/java/com/bytechef/component/ai/universal/text/action/UnmaskAction.java
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,10 @@
49
49
*/
50
50
publicclassUnmaskActionimplementsAiTextAction {
51
51
52
+
privatestaticfinalStringSYSTEM_PROMPT =
53
+
"Replace the redacted content with values in the map. Return only the unredacted text with no additional " +
0 commit comments