mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
Add OLLAMA_EMBEDDING_MODEL to starter distro
This allows a user to specify the Ollama Embedding Model to use, if any. Signed-off-by: Ben Browning <bbrownin@redhat.com>
This commit is contained in:
parent
497c97487f
commit
9239b338d5
2 changed files with 21 additions and 0 deletions
|
@ -542,6 +542,12 @@ models:
|
|||
provider_id: ollama
|
||||
provider_model_id: ${env.OLLAMA_INFERENCE_MODEL:__disabled__}
|
||||
model_type: llm
|
||||
- metadata:
|
||||
embedding_dimension: ${env.OLLAMA_EMBEDDING_DIMENSION:384}
|
||||
model_id: ollama/${env.OLLAMA_EMBEDDING_MODEL:__disabled__}
|
||||
provider_id: ollama
|
||||
provider_model_id: ${env.OLLAMA_EMBEDDING_MODEL:__disabled__}
|
||||
model_type: embedding
|
||||
- metadata: {}
|
||||
model_id: anthropic/claude-3-5-sonnet-latest
|
||||
provider_id: anthropic
|
||||
|
|
|
@ -88,6 +88,13 @@ def get_inference_providers() -> tuple[list[Provider], dict[str, list[ProviderMo
|
|||
provider_model_id="${env.OLLAMA_INFERENCE_MODEL:__disabled__}",
|
||||
model_type=ModelType.llm,
|
||||
),
|
||||
ProviderModelEntry(
|
||||
provider_model_id="${env.OLLAMA_EMBEDDING_MODEL:__disabled__}",
|
||||
model_type=ModelType.embedding,
|
||||
metadata={
|
||||
"embedding_dimension": "${env.OLLAMA_EMBEDDING_DIMENSION:384}",
|
||||
},
|
||||
),
|
||||
],
|
||||
OllamaImplConfig.sample_run_config(
|
||||
url="${env.OLLAMA_URL:http://localhost:11434}", raise_on_connect_error=False
|
||||
|
@ -286,5 +293,13 @@ def get_distribution_template() -> DistributionTemplate:
|
|||
"",
|
||||
"Optional Ollama Inference Model to register on startup",
|
||||
),
|
||||
"OLLAMA_EMBEDDING_MODEL": (
|
||||
"",
|
||||
"Optional Ollama Embedding Model to register on startup",
|
||||
),
|
||||
"OLLAMA_EMBEDDING_DIMENSION": (
|
||||
"384",
|
||||
"Ollama Embedding Dimension",
|
||||
),
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue