Elffuss BraidHub

kikocis/llama-stack public

efac2a2f572e · 853 BRawPermalink
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the terms described in the LICENSE file in
5# the root directory of this source tree.
6
7# supress warnings and spew of logs from hugging face
8import transformers
9
10from .base import ( # noqa: F401
11 DummyShield,
12 OnViolationAction,
13 ShieldBase,
14 ShieldResponse,
15 TextShield,
16)
17from .code_scanner import CodeScannerShield # noqa: F401
18from .contrib.third_party_shield import ThirdPartyShield # noqa: F401
19from .llama_guard import LlamaGuardShield # noqa: F401
20from .prompt_guard import ( # noqa: F401
21 InjectionShield,
22 JailbreakShield,
23 PromptGuardShield,
24)
25
26transformers.logging.set_verbosity_error()
27
28import os
29
30os.environ["TOKENIZERS_PARALLELISM"] = "false"
31
32import warnings
33
34warnings.filterwarnings("ignore")