gen_ai_hub.orchestration.models.content_filter
index
/home/jenkins/agent/workspace/ation_generative-ai-hub-sdk_main/gen_ai_hub/orchestration/models/content_filter.py

 
Classes
       
builtins.str(builtins.object)
ContentFilterProvider(builtins.str, enum.Enum)
enum.Enum(builtins.object)
ContentFilterProvider(builtins.str, enum.Enum)
gen_ai_hub.orchestration.models.base.JSONSerializable(abc.ABC)
ContentFilter

 
class ContentFilter(gen_ai_hub.orchestration.models.base.JSONSerializable)
    ContentFilter(provider: Union[gen_ai_hub.orchestration.models.content_filter.ContentFilterProviderstr], config: dict)
 
Base class for content filtering configurations.
 
This class provides a generic structure for defining content filters
from various providers. It allows for specifying the provider and
associated configuration parameters.
 
Args:
    provider: The name of the content filter provider.
    config: A dictionary containing the configuration parameters for the content filter.
 
 
Method resolution order:
ContentFilter
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, provider: Union[gen_ai_hub.orchestration.models.content_filter.ContentFilterProvider, str], config: dict)
Initialize self.  See help(type(self)) for accurate signature.
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {}

Data descriptors inherited from gen_ai_hub.orchestration.models.base.JSONSerializable:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class ContentFilterProvider(builtins.str, enum.Enum)
    ContentFilterProvider(value, names=None, *, module=None, qualname=None, type=None, start=1)
 
Enumerates supported content filter providers.
 
This enum defines the available content filtering services that can be used
for content moderation tasks. Each enum value represents a specific provider.
 
Values:
    AZURE: Represents the Azure Content Safety service.
    LLAMA_GUARD_3_8B: Represents the Llama Guard 3 based on Llama-3.1-8B pretrained model.
 
 
Method resolution order:
ContentFilterProvider
builtins.str
enum.Enum
builtins.object

Data and other attributes defined here:
AZURE = <ContentFilterProvider.AZURE: 'azure_content_safety'>
LLAMA_GUARD_3_8B = <ContentFilterProvider.LLAMA_GUARD_3_8B: 'llama_guard_3_8b'>

Data descriptors inherited from enum.Enum:
name
The name of the Enum member.
value
The value of the Enum member.

Readonly properties inherited from enum.EnumMeta:
__members__
Returns a mapping of member name->value.
 
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.

 
Data
        Union = typing.Union