mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-21 12:09:40 +00:00
do not throw error when listing vector-dbs
This commit is contained in:
parent
53ac8532e4
commit
5d146ec5cf
1 changed files with 8 additions and 4 deletions
|
@ -163,10 +163,14 @@ class VectorIORouter(VectorIO):
|
||||||
vector_dbs = await self.routing_table.get_all_with_type("vector_db")
|
vector_dbs = await self.routing_table.get_all_with_type("vector_db")
|
||||||
all_stores = []
|
all_stores = []
|
||||||
for vector_db in vector_dbs:
|
for vector_db in vector_dbs:
|
||||||
vector_store = await self.routing_table.get_provider_impl(
|
try:
|
||||||
vector_db.identifier
|
vector_store = await self.routing_table.get_provider_impl(
|
||||||
).openai_retrieve_vector_store(vector_db.identifier)
|
vector_db.identifier
|
||||||
all_stores.append(vector_store)
|
).openai_retrieve_vector_store(vector_db.identifier)
|
||||||
|
all_stores.append(vector_store)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error retrieving vector store {vector_db.identifier}: {e}")
|
||||||
|
continue
|
||||||
|
|
||||||
# Sort by created_at
|
# Sort by created_at
|
||||||
reverse_order = order == "desc"
|
reverse_order = order == "desc"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue