mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-16 06:53:47 +00:00
add deprecation_error pointing meta-reference -> inline::llama-guard
This commit is contained in:
parent
fdaec91747
commit
984ba074e1
9 changed files with 84 additions and 74 deletions
|
@ -5,6 +5,7 @@
|
|||
# the root directory of this source tree.
|
||||
import importlib
|
||||
import inspect
|
||||
import sys
|
||||
|
||||
from typing import Any, Dict, List, Set
|
||||
|
||||
|
@ -102,10 +103,14 @@ async def resolve_impls(
|
|||
)
|
||||
|
||||
p = provider_registry[api][provider.provider_type]
|
||||
if p.deprecation_warning:
|
||||
if p.deprecation_error:
|
||||
cprint(p.deprecation_error, "red", attrs=["bold"])
|
||||
sys.exit(1)
|
||||
|
||||
elif p.deprecation_warning:
|
||||
cprint(
|
||||
f"Provider `{provider.provider_type}` for API `{api}` is deprecated and will be removed in a future release: {p.deprecation_warning}",
|
||||
"red",
|
||||
"yellow",
|
||||
attrs=["bold"],
|
||||
)
|
||||
p.deps__ = [a.value for a in p.api_dependencies]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue