add info to upgrade run.yaml when the default embedding model is not found

This commit is contained in:
Dinesh Yeduguru 2024-12-13 12:47:07 -08:00
parent ee5066806e
commit d73575dd9d

View file

@ -308,6 +308,13 @@ class MemoryBanksRoutingTable(CommonRoutingTableImpl, MemoryBanks):
) )
model = await self.get_object_by_identifier("model", params.embedding_model) model = await self.get_object_by_identifier("model", params.embedding_model)
if model is None: if model is None:
if params.embedding_model == "all-MiniLM-L6-v2":
raise ValueError(
"Embeddings are now served via Inference providers. "
"Please upgrade your run.yaml to include inline::sentence-transformer as an additional inference provider. "
"See https://github.com/meta-llama/llama-stack/blob/main/llama_stack/templates/together/run.yaml for an example."
)
else:
raise ValueError(f"Model {params.embedding_model} not found") raise ValueError(f"Model {params.embedding_model} not found")
if model.model_type != ModelType.embedding: if model.model_type != ModelType.embedding:
raise ValueError( raise ValueError(