mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 04:50:39 +00:00
chore: standardize tool group not found error (#2986)
# What does this PR do? 1. Creates a new `ToolGroupNotFoundError` class 2. Implements the new class where appropriate Relates to #2379 Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
This commit is contained in:
parent
55a2694c80
commit
05cfa213b6
2 changed files with 13 additions and 2 deletions
|
@ -40,3 +40,13 @@ class DatasetNotFoundError(ValueError):
|
|||
def __init__(self, dataset_name: str) -> None:
|
||||
message = f"Dataset '{dataset_name}' not found. Use client.datasets.list() to list available datasets."
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class ToolGroupNotFoundError(ValueError):
|
||||
"""raised when Llama Stack cannot find a referenced tool group"""
|
||||
|
||||
def __init__(self, toolgroup_name: str) -> None:
|
||||
message = (
|
||||
f"Tool group '{toolgroup_name}' not found. Use client.toolgroups.list() to list available tool groups."
|
||||
)
|
||||
super().__init__(message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue