Field Name | Description |
Rule Name | Set the rule name. |
Session Identifier | Select the previously configured session identifier to distinguish different users and implement precise content security detection for individual users. Note: You do not need to configure this parameter when using the SDK/API Integration method. |
Condition | By default, select the LLM security business matching method and the added LLM security business protection path configuration. Note: Different matching methods within a single rule are in an "AND" relationship. You do not need to configure this parameter when using the SDK/API Integration method. |
Detection Mode | Input And Output Are Detected: Detects both input and output content. Only Detect Input Content: Detects the prompt content defined in the LLM protection path. Detect Output Content Only: Detects the thinking and output content defined in the LLM protection path. If the model is a reasoning model, the detection scope of output content includes both thinking content and answer content. Domains connected through CLB-type WAF do not support this feature currently. |
Modal Type | Text: Performs security detection on text content in user interactions. The text size of a single request cannot exceed 240 KB. Image: Performs security detection on image content in user interactions. A single image cannot exceed 10 MB, and JPG, JPEG, and other formats are supported. Note: Only the SDK/API Integration method supports configuring the modality type. |
Detection Content | You can select the operation logic among multiple conditions. AND (default) OR |
| Data classification: Covers the identification of multiple types of sensitive information, such as email addresses, URLs, and IP addresses. The complete list of rules is subject to what is displayed in the console. Note: Only the Ultimate Edition of LLM Security supports sensitive information recognition and detection. Sensitive information: Supports the identification of illegal and non-compliant content, and provides detection levels with different strictness. The complete list of rules is subject to what is displayed in the console. Keyword: Supports the identification of keyword information. You can configure up to 20 keywords, and multiple keywords are evaluated with an OR relationship. Note that for output content detection, WAF performs combined detection on long text because LLM output is streamed. Therefore, if a configured keyword is too long, detection may fail to match. We recommend that you configure a single keyword to be no more than 10 characters in length. Prompt injection: Supports the identification of prompt injection attack behaviors. Note that when this content configuration is selected, only the input information is detected. Regular expression: Supports regex matching. Enter multiple values separated by carriage return, up to 20 values, with a maximum of 120 characters per value. Note: Regular expressions support only the RE2 syntax specification. Encoding type identification: Supports detecting whether the input or output contains content of specific encoding types. Supports encoding types such as Base64 and URL/Percent encoding. Multiple selections are supported, and the relationship between multiple encoding types is "OR", meaning that the rule is triggered when any one of them is matched. |
Action | Observe: Logs are recorded, but user requests are not blocked. Block: Blocks user requests and returns a prompt. |
Priority | Configure the rule priority. Priority logic: Enter an integer from 1 to 100. A smaller value indicates a higher execution priority for this rule. When priorities are the same, a later update time indicates a higher priority. |
if (!initResponse.ok) {const errorText = await initResponse.text();console.error('API error response:', errorText);removeMessage(responseMessageId); // Remove the message container currently displayed// Parse the error message returned by the serverlet errorMessage = '';try {const errorData = JSON.parse(errorText);errorMessage = errorData.error?.message || errorData.message || errorText;} catch (e) {errorMessage = errorText;}// Display the error message in the chat interfaceaddMessage(errorMessage, 'error');updateStatus('Request failed', 'error');return;}
// UUID detection handling - based on code logicif (parsed.uuid) {console.log('🚨 Content replacement signal detected!');console.log('Original data:', parsed);console.log('Content before replacement:', fullContent);// Extract new content from the data returned by the serverlet newContent = '';if (parsed.choices && parsed.choices[0] && parsed.choices[0].delta && parsed.choices[0].delta.content) {newContent = parsed.choices[0].delta.content;console.log('✅ Content obtained from choices[0].delta.content:', newContent);} else if (parsed.content) {newContent = parsed.content;console.log('✅ Content obtained from content:', newContent);} else {console.log('⚠️ content not found in the data');}// Completely reset the displayed contentfullContent = newContent;reasoning = '';contentWasReplaced = true;// Clear the currently displayed content and display the new content returned by the serverif (selectedModel === 'deepseek-reasoner') {// R1 mode: clear the thinking process and answer, and display new contentclearR1Message(responseMessageId);updateR1StreamingMessage(responseMessageId, '', fullContent, false);addContentReplacedIndicator(responseMessageId);} else {// Normal mode: clear messages and display new contentclearStreamingMessage(responseMessageId);updateStreamingMessage(responseMessageId, fullContent, true);addContentReplacedIndicator(responseMessageId);}console.log('✅ Content replacement completed. Current fullContent:', `"${fullContent}"`);// Stop processing subsequent data streamsshouldStopProcessing = true;console.log('🛑 Stop processing flag set. Subsequent data will not be processed');}


Field Name | Description |
Library Name | Name of the custom keyword library. |
Description | Description of the custom keyword library. |
Keyword | Keywords in the custom keyword library. Enter only one keyword per line, with a maximum of 1000 lines per configuration. |
Field Name | Description |
Library Name | Name of the custom keyword library. |
Description | Description of the custom keyword library. |
Keyword | Keywords in the custom keyword library. Enter only one keyword per line, with a maximum of 1000 lines per configuration. |
Field Name | Description |
Detection Mode | Input and output are detected. |
Detection Content | Information Type: Keyword. Content: 12345, abcd. |
Action | Block. |
Interception Prompt | Customize the prompt and set the content to: custom prompt interception test verification. |
Priority | 1. |
On/Off | On. |


Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan