mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-27 18:52:03 +00:00
chore: moved from general exceptions to apis/common/exceptions.py
This commit is contained in:
parent
ed4a776cc5
commit
a7c6328d0c
4 changed files with 3 additions and 3 deletions
13
llama_stack/apis/common/errors.py
Normal file
13
llama_stack/apis/common/errors.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# 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.
|
||||
|
||||
|
||||
class UnsupportedModelError(ValueError):
|
||||
"""raised when model is not present in the list of supported models"""
|
||||
|
||||
def __init__(self, model_name: str, supported_models_list: list[str]):
|
||||
message = f"'{model_name}' model is not supported. Supported models are: {', '.join(supported_models_list)}"
|
||||
super().__init__(message)
|
||||
Loading…
Add table
Add a link
Reference in a new issue