mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-11 04:28:02 +00:00
add comment describing the fiddlecube adapter
This commit is contained in:
parent
7fdc50a837
commit
1152356a3a
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,14 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class FiddlecubeSafetyAdapter(Safety, ShieldsProtocolPrivate):
|
class FiddlecubeSafetyAdapter(Safety, ShieldsProtocolPrivate):
|
||||||
|
"""
|
||||||
|
Implementation of the Fiddlecube Safety API.
|
||||||
|
|
||||||
|
Accepts a list of messages for content moderation.
|
||||||
|
Optionally, a list of `excluded_categories` can be provided to exclude certain categories from moderation.
|
||||||
|
Category name strings map to the llama-guard risk taxonomy.
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, config: FiddlecubeSafetyConfig) -> None:
|
def __init__(self, config: FiddlecubeSafetyConfig) -> None:
|
||||||
self.config = config
|
self.config = config
|
||||||
self.registered_shields = []
|
self.registered_shields = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue