mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 12:21:52 +00:00
add safety adapters, configuration handling, server + clients
This commit is contained in:
parent
9dafa6ad94
commit
fe582a739d
13 changed files with 286 additions and 67 deletions
25
llama_toolchain/safety/adapters.py
Normal file
25
llama_toolchain/safety/adapters.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
from typing import List
|
||||
|
||||
from llama_toolchain.distribution.datatypes import Adapter, ApiSurface, SourceAdapter
|
||||
|
||||
|
||||
def available_safety_adapters() -> List[Adapter]:
|
||||
return [
|
||||
SourceAdapter(
|
||||
api_surface=ApiSurface.safety,
|
||||
adapter_id="meta-reference",
|
||||
pip_packages=[
|
||||
"codeshield",
|
||||
"torch",
|
||||
"transformers",
|
||||
],
|
||||
module="llama_toolchain.safety.safety",
|
||||
config_class="llama_toolchain.safety.config.SafetyConfig",
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue