text:
CivitaiXGuardModerationText is a node designed to facilitate the moderation of text content by leveraging the xGuardModeration recipe via Civitai Orchestration. This node is particularly useful for AI artists and developers who need to ensure that their text content adheres to specific moderation guidelines or standards. By analyzing the text, it can identify potentially problematic content, providing insights into whether the text is blocked or if certain labels are triggered. This functionality is crucial for maintaining content quality and compliance, especially in environments where user-generated content is prevalent. The node operates by evaluating the text against a set of predefined or custom labels, offering a flexible moderation solution that can be tailored to specific needs.
text Input Parameters:
labels_json
This parameter allows you to specify an optional label filter in JSON format. When provided, only the named labels within this JSON are evaluated during the moderation process. If a label is not found in the defaults or the label overrides, it is silently ignored. This parameter is useful for focusing the moderation on specific areas of concern. The default value is an empty string, which means all labels are evaluated. There are no minimum or maximum values as it is a JSON string.
label_overrides_json
This parameter accepts a JSON string that provides optional label configuration overrides. These overrides merge with or replace the default settings from the XGuardModerationOptionsGrain for the given mode. This allows for customization of the moderation criteria to better fit specific requirements. The default value is an empty string, and like labels_json, it is a JSON string without specific minimum or maximum values.
store_full_response
This parameter is a boolean value that determines whether the full response from the moderation process should be stored. If set to true, the complete response data is retained, which can be useful for debugging or detailed analysis. The default value is false, meaning only essential data is stored.
text
This parameter is the main input for the node, representing the text content that needs to be moderated. It is a string value and serves as the primary subject of the moderation analysis. There are no default, minimum, or maximum values specified, as it depends on the text content you wish to evaluate.
text Output Parameters:
results
This output provides the moderation results in JSON format. It contains detailed information about the moderation process, including any actions taken or labels triggered. This output is crucial for understanding the outcome of the moderation and making informed decisions based on the analysis.
signal_metadata
This output contains metadata related to the moderation signals in JSON format. It provides additional context about the moderation process, which can be useful for understanding how the moderation decisions were made.
blocked
This output is a string that indicates whether the text content was blocked during the moderation process. A value of "true" means the content was blocked, while "false" indicates it was not. This output is essential for quickly determining the moderation status of the text.
triggered_labels
This output provides a JSON list of labels that were triggered during the moderation process. It helps identify specific areas of concern within the text, allowing for targeted adjustments or reviews.
workflow_id
This output is a string that represents the unique identifier for the moderation workflow. It is useful for tracking and referencing specific moderation processes, especially in environments with multiple concurrent workflows.
raw_json
This output contains the raw JSON response from the moderation process. It includes all data returned by the moderation system, providing a comprehensive view of the moderation analysis.
text Usage Tips:
- Customize the
labels_jsonandlabel_overrides_jsonparameters to focus the moderation on specific content areas or to adjust the moderation criteria to better fit your needs. - Use the
store_full_responseparameter to retain detailed moderation data for further analysis or debugging, especially if you encounter unexpected moderation results. - Regularly review the
triggered_labelsoutput to identify common issues in your text content and adjust your content creation practices accordingly.
text Common Errors and Solutions:
Invalid JSON Format
- Explanation: This error occurs when the
labels_jsonorlabel_overrides_jsonparameters contain improperly formatted JSON. - Solution: Ensure that the JSON strings are correctly formatted, with proper syntax including brackets, commas, and quotation marks.
Text Input Too Large
- Explanation: The text input exceeds the maximum allowable size for moderation.
- Solution: Break down the text into smaller segments and process them individually to ensure they fall within the acceptable size limits.
Missing API Configuration
- Explanation: The node requires an API configuration to connect to the Civitai service, but it is missing or incorrect.
- Solution: Verify that the
api_configparameter is correctly set up with a valid Civitai API token or OAuth login.
