mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-12 05:54:38 +00:00
Replace MissingEmbeddingModelError with IBM Granite default
- Replace error with ibm-granite/granite-embedding-125m-english default - Based on issue #2418 for commercial compatibility and better UX - Update tests to verify default fallback behavior - Update documentation to reflect new precedence rules - Remove unused MissingEmbeddingModelError class - Update tip section to clarify fallback behavior Resolves review comment to use default instead of error.
This commit is contained in:
parent
8e2675f50c
commit
e411099cbf
4 changed files with 39 additions and 62 deletions
|
@ -8,19 +8,19 @@ from llama_stack.apis.common.vector_store_config import VectorStoreConfig
|
|||
|
||||
|
||||
def test_defaults():
|
||||
cfg = VectorStoreConfig()
|
||||
assert cfg.default_embedding_model is None
|
||||
assert cfg.default_embedding_dimension is None
|
||||
config = VectorStoreConfig()
|
||||
assert config.default_embedding_model is None
|
||||
assert config.default_embedding_dimension is None
|
||||
|
||||
|
||||
def test_env_loading(monkeypatch):
|
||||
monkeypatch.setenv("LLAMA_STACK_DEFAULT_EMBEDDING_MODEL", "test-model")
|
||||
monkeypatch.setenv("LLAMA_STACK_DEFAULT_EMBEDDING_DIMENSION", "123")
|
||||
|
||||
cfg = VectorStoreConfig()
|
||||
assert cfg.default_embedding_model == "test-model"
|
||||
assert cfg.default_embedding_dimension == 123
|
||||
config = VectorStoreConfig()
|
||||
assert config.default_embedding_model == "test-model"
|
||||
assert config.default_embedding_dimension == 123
|
||||
|
||||
# Clean up
|
||||
# cleanup
|
||||
monkeypatch.delenv("LLAMA_STACK_DEFAULT_EMBEDDING_MODEL", raising=False)
|
||||
monkeypatch.delenv("LLAMA_STACK_DEFAULT_EMBEDDING_DIMENSION", raising=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue