mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-02 08:44:44 +00:00
add all providers
This commit is contained in:
parent
e6ed7eabbb
commit
eeb914fe4d
3 changed files with 9 additions and 8 deletions
|
@ -20,7 +20,7 @@ class FaissImplConfig(BaseModel):
|
||||||
kvstore: KVStoreConfig
|
kvstore: KVStoreConfig
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def sample_run_config(cls, __distro_dir__: str) -> Dict[str, Any]:
|
def sample_run_config(cls, __distro_dir__: str = "runtime") -> Dict[str, Any]:
|
||||||
return {
|
return {
|
||||||
"kvstore": SqliteKVStoreConfig.sample_run_config(
|
"kvstore": SqliteKVStoreConfig.sample_run_config(
|
||||||
__distro_dir__=__distro_dir__,
|
__distro_dir__=__distro_dir__,
|
||||||
|
|
|
@ -25,13 +25,7 @@ providers:
|
||||||
kvstore:
|
kvstore:
|
||||||
type: sqlite
|
type: sqlite
|
||||||
namespace: null
|
namespace: null
|
||||||
db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/together}/faiss_store.db
|
db_path: ${env.SQLITE_STORE_DIR:~/.llama/runtime}/faiss_store.db
|
||||||
- provider_id: chromadb
|
|
||||||
provider_type: remote::chromadb
|
|
||||||
config: {}
|
|
||||||
- provider_id: pgvector
|
|
||||||
provider_type: remote::pgvector
|
|
||||||
config: {}
|
|
||||||
safety:
|
safety:
|
||||||
- provider_id: llama-guard
|
- provider_id: llama-guard
|
||||||
provider_type: inline::llama-guard
|
provider_type: inline::llama-guard
|
||||||
|
|
|
@ -9,6 +9,7 @@ from pathlib import Path
|
||||||
from llama_models.sku_list import all_registered_models
|
from llama_models.sku_list import all_registered_models
|
||||||
|
|
||||||
from llama_stack.distribution.datatypes import ModelInput, Provider, ShieldInput
|
from llama_stack.distribution.datatypes import ModelInput, Provider, ShieldInput
|
||||||
|
from llama_stack.providers.inline.memory.faiss.config import FaissImplConfig
|
||||||
from llama_stack.providers.remote.inference.together import TogetherImplConfig
|
from llama_stack.providers.remote.inference.together import TogetherImplConfig
|
||||||
from llama_stack.providers.remote.inference.together.together import MODEL_ALIASES
|
from llama_stack.providers.remote.inference.together.together import MODEL_ALIASES
|
||||||
|
|
||||||
|
@ -32,6 +33,11 @@ def get_distribution_template() -> DistributionTemplate:
|
||||||
provider_type="remote::together",
|
provider_type="remote::together",
|
||||||
config=TogetherImplConfig.sample_run_config(),
|
config=TogetherImplConfig.sample_run_config(),
|
||||||
)
|
)
|
||||||
|
memory_provider = Provider(
|
||||||
|
provider_id="faiss",
|
||||||
|
provider_type="inline::faiss",
|
||||||
|
config=FaissImplConfig.sample_run_config(),
|
||||||
|
)
|
||||||
|
|
||||||
core_model_to_hf_repo = {
|
core_model_to_hf_repo = {
|
||||||
m.descriptor(): m.huggingface_repo for m in all_registered_models()
|
m.descriptor(): m.huggingface_repo for m in all_registered_models()
|
||||||
|
@ -56,6 +62,7 @@ def get_distribution_template() -> DistributionTemplate:
|
||||||
"run.yaml": RunConfigSettings(
|
"run.yaml": RunConfigSettings(
|
||||||
provider_overrides={
|
provider_overrides={
|
||||||
"inference": [inference_provider],
|
"inference": [inference_provider],
|
||||||
|
"memory": [memory_provider],
|
||||||
},
|
},
|
||||||
default_models=default_models,
|
default_models=default_models,
|
||||||
default_shields=[ShieldInput(shield_id="meta-llama/Llama-Guard-3-8B")],
|
default_shields=[ShieldInput(shield_id="meta-llama/Llama-Guard-3-8B")],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue