mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 04:50:39 +00:00
chore: standardize vector store not found error (#2968)
# What does this PR do? 1. Creates a new `VectorStoreNotFoundError` 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
272a3e9937
commit
cd5c6a2fcd
9 changed files with 46 additions and 31 deletions
|
@ -26,6 +26,14 @@ class ModelNotFoundError(ValueError):
|
|||
super().__init__(message)
|
||||
|
||||
|
||||
class VectorStoreNotFoundError(ValueError):
|
||||
"""raised when Llama Stack cannot find a referenced vector store"""
|
||||
|
||||
def __init__(self, vector_store_name: str) -> None:
|
||||
message = f"Vector store '{vector_store_name}' not found. Use client.vector_dbs.list() to list available vector stores."
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class DatasetNotFoundError(ValueError):
|
||||
"""raised when Llama Stack cannot find a referenced dataset"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue