From 31cc9715031b4ec8b8b54c5c118106a01fef3589 Mon Sep 17 00:00:00 2001 From: Charlie Doern Date: Mon, 23 Jun 2025 11:20:54 -0400 Subject: [PATCH 1/3] feat: convert provider config to a file path currently provider.config is a dictionary. Introduce the ability to specify either a file path or the current in-file dictionary. Allowing users to specify a file path enables more robust config management allowing stack administrators to swap in different provider configs seamlessly Signed-off-by: Charlie Doern --- llama_stack/cli/stack/_build.py | 18 ++- llama_stack/cli/stack/run.py | 4 +- llama_stack/distribution/configure.py | 3 +- llama_stack/distribution/datatypes.py | 5 +- llama_stack/distribution/distribution.py | 23 +++ llama_stack/distribution/providers.py | 4 +- llama_stack/distribution/resolver.py | 13 +- llama_stack/distribution/server/server.py | 8 +- llama_stack/distribution/stack.py | 133 +--------------- llama_stack/distribution/utils/env.py | 143 ++++++++++++++++++ .../providers/utils/sqlstore/sqlstore.py | 24 +-- llama_stack/templates/postgres-demo/run.yaml | 10 +- tests/unit/server/test_replace_env_vars.py | 2 +- .../openai-api-verification-run.yaml | 10 +- 14 files changed, 226 insertions(+), 174 deletions(-) create mode 100644 llama_stack/distribution/utils/env.py diff --git a/llama_stack/cli/stack/_build.py b/llama_stack/cli/stack/_build.py index 7ade6f17a..5c2968b1d 100644 --- a/llama_stack/cli/stack/_build.py +++ b/llama_stack/cli/stack/_build.py @@ -37,9 +37,9 @@ from llama_stack.distribution.datatypes import ( ) from llama_stack.distribution.distribution import get_provider_registry from llama_stack.distribution.resolver import InvalidProviderError -from llama_stack.distribution.stack import replace_env_vars from llama_stack.distribution.utils.config_dirs import DISTRIBS_BASE_DIR, EXTERNAL_PROVIDERS_DIR from llama_stack.distribution.utils.dynamic import instantiate_class_type +from llama_stack.distribution.utils.env import replace_env_vars from llama_stack.distribution.utils.exec import formulate_run_args, run_command from llama_stack.distribution.utils.image_types import LlamaStackImageType from llama_stack.providers.datatypes import Api @@ -403,15 +403,27 @@ def _run_stack_build_command_from_build_config( if template_name: # copy run.yaml from template to build_dir instead of generating it again template_path = importlib.resources.files("llama_stack") / f"templates/{template_name}/run.yaml" + run_config_file: Path = None + provider_configs_new_dir: Path = None with importlib.resources.as_file(template_path) as path: run_config_file = build_dir / f"{template_name}-run.yaml" shutil.copy(path, run_config_file) + provider_configs_path = importlib.resources.files("llama_stack") / f"templates/{template_name}/provider_configs" + with importlib.resources.as_file(provider_configs_path) as path: + provider_configs_new_dir = build_dir / "provider_configs" + os.makedirs(provider_configs_new_dir, exist_ok=True) + shutil.copytree(path, provider_configs_new_dir, dirs_exist_ok=True) + cprint("Build Successful!", color="green", file=sys.stderr) - cprint(f"You can find the newly-built template here: {template_path}", color="blue", file=sys.stderr) + cprint( + f"You can find the newly-built template here: {run_config_file} and its provider configurations here {provider_configs_new_dir}", + color="blue", + file=sys.stderr, + ) cprint( "You can run the new Llama Stack distro via: " - + colored(f"llama stack run {template_path} --image-type {build_config.image_type}", "blue"), + + colored(f"llama stack run {run_config_file} --image-type {build_config.image_type}", "blue"), color="green", file=sys.stderr, ) diff --git a/llama_stack/cli/stack/run.py b/llama_stack/cli/stack/run.py index 2f768957d..efbba73f2 100644 --- a/llama_stack/cli/stack/run.py +++ b/llama_stack/cli/stack/run.py @@ -156,7 +156,7 @@ class StackRun(Subcommand): if callable(getattr(args, arg)): continue if arg == "config" and template_name: - server_args.config = str(config_file) + server_args.template = str(template_name) else: setattr(server_args, arg, getattr(args, arg)) @@ -169,6 +169,8 @@ class StackRun(Subcommand): if config_file: run_args.extend(["--config", str(config_file)]) + if template_name: + run_args.extend(["--template", str(template_name)]) if args.env: for env_var in args.env: diff --git a/llama_stack/distribution/configure.py b/llama_stack/distribution/configure.py index e58ea0338..45dd82074 100644 --- a/llama_stack/distribution/configure.py +++ b/llama_stack/distribution/configure.py @@ -16,6 +16,7 @@ from llama_stack.distribution.datatypes import ( from llama_stack.distribution.distribution import ( builtin_automatically_routed_apis, get_provider_registry, + resolve_config, ) from llama_stack.distribution.utils.config_dirs import EXTERNAL_PROVIDERS_DIR from llama_stack.distribution.utils.dynamic import instantiate_class_type @@ -30,7 +31,7 @@ def configure_single_provider(registry: dict[str, ProviderSpec], provider: Provi config_type = instantiate_class_type(provider_spec.config_class) try: if provider.config: - existing = config_type(**provider.config) + existing = resolve_config(provider=provider, provider_spec=provider_spec) else: existing = None except Exception: diff --git a/llama_stack/distribution/datatypes.py b/llama_stack/distribution/datatypes.py index 5e48ac0ad..16f160e32 100644 --- a/llama_stack/distribution/datatypes.py +++ b/llama_stack/distribution/datatypes.py @@ -150,7 +150,10 @@ class Provider(BaseModel): # when the provider is enabled via a conditional environment variable provider_id: str | None provider_type: str - config: dict[str, Any] + config: str | dict[str, Any] | None = Field( + default=None, + description="Provider configuration dictionary or path to provider configuration file", + ) class LoggingConfig(BaseModel): diff --git a/llama_stack/distribution/distribution.py b/llama_stack/distribution/distribution.py index e37b2c443..f7dfa04f6 100644 --- a/llama_stack/distribution/distribution.py +++ b/llama_stack/distribution/distribution.py @@ -7,11 +7,15 @@ import glob import importlib import os +from pathlib import Path from typing import Any import yaml from pydantic import BaseModel +from llama_stack.distribution.datatypes import Provider +from llama_stack.distribution.utils.dynamic import instantiate_class_type +from llama_stack.distribution.utils.env import replace_env_vars from llama_stack.log import get_logger from llama_stack.providers.datatypes import ( AdapterSpec, @@ -188,3 +192,22 @@ def get_provider_registry( logger.error(f"Failed to load provider spec from {spec_path}: {e}") raise e return ret + + +def resolve_config(provider: Provider, provider_spec: ProviderSpec | None = None, api: str | None = None): + if not provider_spec: + if not api: + raise ValueError("In order to get provider spec, must have API") + registry = get_provider_registry() + provider_spec = registry[Api(api)][provider.provider_type] + config_type = instantiate_class_type(provider_spec.config_class) + try: + if provider.config and isinstance(provider.config, str): + with open(Path(provider.config).expanduser().resolve()) as f: + config: dict[str, Any] = yaml.safe_load(f) + replaced = replace_env_vars(config) + return config_type(**replaced) + elif provider.config is not None: + return config_type(**provider.config) + except Exception as e: + raise ValueError("Error getting provider config") from e diff --git a/llama_stack/distribution/providers.py b/llama_stack/distribution/providers.py index 1d9c1f4e9..1b19bd365 100644 --- a/llama_stack/distribution/providers.py +++ b/llama_stack/distribution/providers.py @@ -10,6 +10,7 @@ from typing import Any from pydantic import BaseModel from llama_stack.apis.providers import ListProvidersResponse, ProviderInfo, Providers +from llama_stack.distribution.distribution import resolve_config from llama_stack.log import get_logger from llama_stack.providers.datatypes import HealthResponse, HealthStatus @@ -51,12 +52,13 @@ class ProviderImpl(Providers): # Skip providers that are not enabled if p.provider_id is None: continue + config = resolve_config(provider=p, api=api) ret.append( ProviderInfo( api=api, provider_id=p.provider_id, provider_type=p.provider_type, - config=p.config, + config=dict(config), health=providers_health.get(api, {}).get( p.provider_id, HealthResponse( diff --git a/llama_stack/distribution/resolver.py b/llama_stack/distribution/resolver.py index 46cd1161e..579161d6f 100644 --- a/llama_stack/distribution/resolver.py +++ b/llama_stack/distribution/resolver.py @@ -34,9 +34,8 @@ from llama_stack.distribution.datatypes import ( RoutingTableProviderSpec, StackRunConfig, ) -from llama_stack.distribution.distribution import builtin_automatically_routed_apis +from llama_stack.distribution.distribution import builtin_automatically_routed_apis, resolve_config from llama_stack.distribution.store import DistributionRegistry -from llama_stack.distribution.utils.dynamic import instantiate_class_type from llama_stack.log import get_logger from llama_stack.providers.datatypes import ( Api, @@ -156,7 +155,7 @@ def specs_for_autorouted_apis(apis_to_serve: list[str] | set[str]) -> dict[str, "__builtin__": ProviderWithSpec( provider_id="__routing_table__", provider_type="__routing_table__", - config={}, + config=None, spec=RoutingTableProviderSpec( api=info.routing_table_api, router_api=info.router_api, @@ -171,7 +170,7 @@ def specs_for_autorouted_apis(apis_to_serve: list[str] | set[str]) -> dict[str, "__builtin__": ProviderWithSpec( provider_id="__autorouted__", provider_type="__autorouted__", - config={}, + config=None, spec=AutoRoutedProviderSpec( api=info.router_api, module="llama_stack.distribution.routers", @@ -329,8 +328,7 @@ async def instantiate_provider( module = importlib.import_module(provider_spec.module) args = [] if isinstance(provider_spec, RemoteProviderSpec): - config_type = instantiate_class_type(provider_spec.config_class) - config = config_type(**provider.config) + config = resolve_config(provider=provider, provider_spec=provider_spec) method = "get_adapter_impl" args = [config, deps] @@ -348,8 +346,7 @@ async def instantiate_provider( else: method = "get_provider_impl" - config_type = instantiate_class_type(provider_spec.config_class) - config = config_type(**provider.config) + config = resolve_config(provider=provider, provider_spec=provider_spec) args = [config, deps] if "policy" in inspect.signature(getattr(module, method)).parameters: args.append(policy) diff --git a/llama_stack/distribution/server/server.py b/llama_stack/distribution/server/server.py index 83407a25f..b7c1e2815 100644 --- a/llama_stack/distribution/server/server.py +++ b/llama_stack/distribution/server/server.py @@ -42,11 +42,10 @@ from llama_stack.distribution.server.routes import ( ) from llama_stack.distribution.stack import ( construct_stack, - replace_env_vars, - validate_env_pair, ) from llama_stack.distribution.utils.config import redact_sensitive_fields from llama_stack.distribution.utils.context import preserve_contexts_async_generator +from llama_stack.distribution.utils.env import replace_env_vars, validate_env_pair from llama_stack.log import get_logger from llama_stack.providers.datatypes import Api from llama_stack.providers.inline.telemetry.meta_reference.config import TelemetryConfig @@ -408,9 +407,10 @@ def main(args: argparse.Namespace | None = None): log_line = f"Using config file: {config_file}" elif args.template: config_file = Path(REPO_ROOT) / "llama_stack" / "templates" / args.template / "run.yaml" - if not config_file.exists(): + provider_configs = Path(REPO_ROOT) / "llama_stack" / "templates" / args.config / "provider_configs" + if not config_file.exists() or not provider_configs.exists(): raise ValueError(f"Template {args.template} does not exist") - log_line = f"Using template {args.template} config file: {config_file}" + log_line = f"Using template {args.template} config file: {config_file} and provider_config directory: {provider_configs}" else: raise ValueError("Either --config or --template must be provided") diff --git a/llama_stack/distribution/stack.py b/llama_stack/distribution/stack.py index 9d873ea15..6afa05678 100644 --- a/llama_stack/distribution/stack.py +++ b/llama_stack/distribution/stack.py @@ -5,8 +5,6 @@ # the root directory of this source tree. import importlib.resources -import os -import re import tempfile from typing import Any @@ -40,6 +38,7 @@ from llama_stack.distribution.providers import ProviderImpl, ProviderImplConfig from llama_stack.distribution.resolver import ProviderRegistry, resolve_impls from llama_stack.distribution.store.registry import create_dist_registry from llama_stack.distribution.utils.dynamic import instantiate_class_type +from llama_stack.distribution.utils.env import replace_env_vars from llama_stack.log import get_logger from llama_stack.providers.datatypes import Api @@ -123,136 +122,6 @@ async def register_resources(run_config: StackRunConfig, impls: dict[Api, Any]): ) -class EnvVarError(Exception): - def __init__(self, var_name: str, path: str = ""): - self.var_name = var_name - self.path = path - super().__init__( - f"Environment variable '{var_name}' not set or empty {f'at {path}' if path else ''}. " - f"Use ${{env.{var_name}:=default_value}} to provide a default value, " - f"${{env.{var_name}:+value_if_set}} to make the field conditional, " - f"or ensure the environment variable is set." - ) - - -def replace_env_vars(config: Any, path: str = "") -> Any: - if isinstance(config, dict): - result = {} - for k, v in config.items(): - try: - result[k] = replace_env_vars(v, f"{path}.{k}" if path else k) - except EnvVarError as e: - raise EnvVarError(e.var_name, e.path) from None - return result - - elif isinstance(config, list): - result = [] - for i, v in enumerate(config): - try: - result.append(replace_env_vars(v, f"{path}[{i}]")) - except EnvVarError as e: - raise EnvVarError(e.var_name, e.path) from None - return result - - elif isinstance(config, str): - # Pattern supports bash-like syntax: := for default and :+ for conditional and a optional value - pattern = r"\${env\.([A-Z0-9_]+)(?::([=+])([^}]*))?}" - - def get_env_var(match: re.Match): - env_var = match.group(1) - operator = match.group(2) # '=' for default, '+' for conditional - value_expr = match.group(3) - - env_value = os.environ.get(env_var) - - if operator == "=": # Default value syntax: ${env.FOO:=default} - # If the env is set like ${env.FOO:=default} then use the env value when set - if env_value: - value = env_value - else: - # If the env is not set, look for a default value - # value_expr returns empty string (not None) when not matched - # This means ${env.FOO:=} and it's accepted and returns empty string - just like bash - if value_expr == "": - return "" - else: - value = value_expr - - elif operator == "+": # Conditional value syntax: ${env.FOO:+value_if_set} - # If the env is set like ${env.FOO:+value_if_set} then use the value_if_set - if env_value: - if value_expr: - value = value_expr - # This means ${env.FOO:+} - else: - # Just like bash, this doesn't care whether the env is set or not and applies - # the value, in this case the empty string - return "" - else: - # Just like bash, this doesn't care whether the env is set or not, since it's not set - # we return an empty string - value = "" - else: # No operator case: ${env.FOO} - if not env_value: - raise EnvVarError(env_var, path) - value = env_value - - # expand "~" from the values - return os.path.expanduser(value) - - try: - result = re.sub(pattern, get_env_var, config) - return _convert_string_to_proper_type(result) - except EnvVarError as e: - raise EnvVarError(e.var_name, e.path) from None - - return config - - -def _convert_string_to_proper_type(value: str) -> Any: - # This might be tricky depending on what the config type is, if 'str | None' we are - # good, if 'str' we need to keep the empty string... 'str | None' is more common and - # providers config should be typed this way. - # TODO: we could try to load the config class and see if the config has a field with type 'str | None' - # and then convert the empty string to None or not - if value == "": - return None - - lowered = value.lower() - if lowered == "true": - return True - elif lowered == "false": - return False - - try: - return int(value) - except ValueError: - pass - - try: - return float(value) - except ValueError: - pass - - return value - - -def validate_env_pair(env_pair: str) -> tuple[str, str]: - """Validate and split an environment variable key-value pair.""" - try: - key, value = env_pair.split("=", 1) - key = key.strip() - if not key: - raise ValueError(f"Empty key in environment variable pair: {env_pair}") - if not all(c.isalnum() or c == "_" for c in key): - raise ValueError(f"Key must contain only alphanumeric characters and underscores: {key}") - return key, value - except ValueError as e: - raise ValueError( - f"Invalid environment variable format '{env_pair}': {str(e)}. Expected format: KEY=value" - ) from e - - def add_internal_implementations(impls: dict[Api, Any], run_config: StackRunConfig) -> None: """Add internal implementations (inspect and providers) to the implementations dictionary. diff --git a/llama_stack/distribution/utils/env.py b/llama_stack/distribution/utils/env.py new file mode 100644 index 000000000..403859aa7 --- /dev/null +++ b/llama_stack/distribution/utils/env.py @@ -0,0 +1,143 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. + +import os +import re +from typing import Any + +from llama_stack.log import get_logger + +logger = get_logger(name=__name__, category="core") + + +class EnvVarError(Exception): + def __init__(self, var_name: str, path: str = ""): + self.var_name = var_name + self.path = path + super().__init__( + f"Environment variable '{var_name}' not set or empty {f'at {path}' if path else ''}. " + f"Use ${{env.{var_name}:=default_value}} to provide a default value, " + f"${{env.{var_name}:+value_if_set}} to make the field conditional, " + f"or ensure the environment variable is set." + ) + + +def replace_env_vars(config: Any, path: str = "") -> Any: + if isinstance(config, dict): + result_dict = {} + for k, v in config.items(): + try: + result_dict[k] = replace_env_vars(v, f"{path}.{k}" if path else k) + except EnvVarError as e: + raise EnvVarError(e.var_name, e.path) from None + return result_dict + + elif isinstance(config, list): + result_list = [] + for i, v in enumerate(config): + try: + result_list.append(replace_env_vars(v, f"{path}[{i}]")) + except EnvVarError as e: + raise EnvVarError(e.var_name, e.path) from None + return result_list + + elif isinstance(config, str): + # Pattern supports bash-like syntax: := for default and :+ for conditional and a optional value + pattern = r"\${env\.([A-Z0-9_]+)(?::([=+])([^}]*))?}" + + def get_env_var(match: re.Match): + env_var = match.group(1) + operator = match.group(2) # '=' for default, '+' for conditional + value_expr = match.group(3) + + env_value = os.environ.get(env_var) + + if operator == "=": # Default value syntax: ${env.FOO:=default} + # If the env is set like ${env.FOO:=default} then use the env value when set + if env_value: + value = env_value + else: + # If the env is not set, look for a default value + # value_expr returns empty string (not None) when not matched + # This means ${env.FOO:=} and it's accepted and returns empty string - just like bash + if value_expr == "": + return "" + else: + value = value_expr + + elif operator == "+": # Conditional value syntax: ${env.FOO:+value_if_set} + # If the env is set like ${env.FOO:+value_if_set} then use the value_if_set + if env_value: + if value_expr: + value = value_expr + # This means ${env.FOO:+} + else: + # Just like bash, this doesn't care whether the env is set or not and applies + # the value, in this case the empty string + return "" + else: + # Just like bash, this doesn't care whether the env is set or not, since it's not set + # we return an empty string + value = "" + else: # No operator case: ${env.FOO} + if not env_value: + raise EnvVarError(env_var, path) + value = env_value + + # expand "~" from the values + return os.path.expanduser(value) + + try: + result = re.sub(pattern, get_env_var, config) + return _convert_string_to_proper_type(result) + except EnvVarError as e: + raise EnvVarError(e.var_name, e.path) from None + + return config + + +def _convert_string_to_proper_type(value: str) -> Any: + # This might be tricky depending on what the config type is, if 'str | None' we are + # good, if 'str' we need to keep the empty string... 'str | None' is more common and + # providers config should be typed this way. + # TODO: we could try to load the config class and see if the config has a field with type 'str | None' + # and then convert the empty string to None or not + if value == "": + return None + + lowered = value.lower() + if lowered == "true": + return True + elif lowered == "false": + return False + + try: + return int(value) + except ValueError: + pass + + try: + return float(value) + except ValueError: + pass + + return value + + +def validate_env_pair(env_pair: str) -> tuple[str, str]: + """Validate and split an environment variable key-value pair.""" + try: + key, value = env_pair.split("=", 1) + key = key.strip() + if not key: + raise ValueError(f"Empty key in environment variable pair: {env_pair}") + if not all(c.isalnum() or c == "_" for c in key): + raise ValueError(f"Key must contain only alphanumeric characters and underscores: {key}") + return key, value + except ValueError as e: + raise ValueError( + f"Invalid environment variable format '{env_pair}': {str(e)}. Expected format: KEY=value" + ) from e diff --git a/llama_stack/providers/utils/sqlstore/sqlstore.py b/llama_stack/providers/utils/sqlstore/sqlstore.py index d558a2a26..29041e96c 100644 --- a/llama_stack/providers/utils/sqlstore/sqlstore.py +++ b/llama_stack/providers/utils/sqlstore/sqlstore.py @@ -48,10 +48,10 @@ class SqliteSqlStoreConfig(SqlAlchemySqlStoreConfig): @classmethod def sample_run_config(cls, __distro_dir__: str, db_name: str = "sqlstore.db"): - return cls( - type="sqlite", - db_path="${env.SQLITE_STORE_DIR:=" + __distro_dir__ + "}/" + db_name, - ) + return { + "type": "sqlite", + "db_path": "${env.SQLITE_STORE_DIR:=" + __distro_dir__ + "}/" + db_name, + } @property def pip_packages(self) -> list[str]: @@ -76,14 +76,14 @@ class PostgresSqlStoreConfig(SqlAlchemySqlStoreConfig): @classmethod def sample_run_config(cls, **kwargs): - return cls( - type="postgres", - host="${env.POSTGRES_HOST:=localhost}", - port="${env.POSTGRES_PORT:=5432}", - db="${env.POSTGRES_DB:=llamastack}", - user="${env.POSTGRES_USER:=llamastack}", - password="${env.POSTGRES_PASSWORD:=llamastack}", - ) + return { + "type": "postgres", + "host": "${env.POSTGRES_HOST:=localhost}", + "port": "${env.POSTGRES_PORT:=5432}", + "db": "${env.POSTGRES_DB:=llamastack}", + "user": "${env.POSTGRES_USER:=llamastack}", + "password": "${env.POSTGRES_PASSWORD:=llamastack}", + } SqlStoreConfig = Annotated[ diff --git a/llama_stack/templates/postgres-demo/run.yaml b/llama_stack/templates/postgres-demo/run.yaml index dd20cc6ac..9f82bff60 100644 --- a/llama_stack/templates/postgres-demo/run.yaml +++ b/llama_stack/templates/postgres-demo/run.yaml @@ -81,11 +81,11 @@ metadata_store: table_name: ${env.POSTGRES_TABLE_NAME:=llamastack_kvstore} inference_store: type: postgres - host: ${env.POSTGRES_HOST:=localhost} - port: ${env.POSTGRES_PORT:=5432} - db: ${env.POSTGRES_DB:=llamastack} - user: ${env.POSTGRES_USER:=llamastack} - password: ${env.POSTGRES_PASSWORD:=llamastack} + host: ${env.POSTGRES_HOST:localhost} + port: ${env.POSTGRES_PORT:5432} + db: ${env.POSTGRES_DB:llamastack} + user: ${env.POSTGRES_USER:llamastack} + password: ${env.POSTGRES_PASSWORD:llamastack} models: - metadata: {} model_id: ${env.INFERENCE_MODEL} diff --git a/tests/unit/server/test_replace_env_vars.py b/tests/unit/server/test_replace_env_vars.py index 432d6aee5..60c6d209a 100644 --- a/tests/unit/server/test_replace_env_vars.py +++ b/tests/unit/server/test_replace_env_vars.py @@ -7,7 +7,7 @@ import os import unittest -from llama_stack.distribution.stack import replace_env_vars +from llama_stack.distribution.utils.env import replace_env_vars class TestReplaceEnvVars(unittest.TestCase): diff --git a/tests/verifications/openai-api-verification-run.yaml b/tests/verifications/openai-api-verification-run.yaml index d6d8cd07d..737bed9ca 100644 --- a/tests/verifications/openai-api-verification-run.yaml +++ b/tests/verifications/openai-api-verification-run.yaml @@ -42,14 +42,14 @@ providers: kvstore: type: sqlite namespace: null - db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/openai}/faiss_store.db + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/openai}/faiss_store.db telemetry: - provider_id: meta-reference provider_type: inline::meta-reference config: service_name: "${env.OTEL_SERVICE_NAME:\u200B}" sinks: ${env.TELEMETRY_SINKS:console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/openai-api-verification}/trace_store.db + sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/openai-api-verification}/trace_store.db safety: - provider_id: llama-guard provider_type: inline::llama-guard @@ -62,10 +62,10 @@ providers: persistence_store: type: sqlite namespace: null - db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/openai}/agents_store.db + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/openai}/agents_store.db responses_store: type: sqlite - db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/openai}/responses_store.db + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/openai}/responses_store.db tool_runtime: - provider_id: brave-search provider_type: remote::brave-search @@ -89,7 +89,7 @@ providers: api_key: ${env.WOLFRAM_ALPHA_API_KEY:} metadata_store: type: sqlite - db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/openai}/registry.db + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/openai}/registry.db models: - metadata: {} model_id: together/meta-llama/Llama-3.3-70B-Instruct-Turbo From a2747955323159a68268bf39555c239dd8d891e7 Mon Sep 17 00:00:00 2001 From: Charlie Doern Date: Wed, 2 Jul 2025 13:20:47 -0400 Subject: [PATCH 2/3] feat: refactor distro codegen rework template.py to generate all provider_configs in a directory called `provider_configs/API` where API groups configs for a specific API together to avoid naming collisions Signed-off-by: Charlie Doern --- .../providers/utils/sqlstore/sqlstore.py | 16 ++++---- llama_stack/templates/starter/starter.py | 3 +- llama_stack/templates/template.py | 39 +++++++++++++++++-- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/llama_stack/providers/utils/sqlstore/sqlstore.py b/llama_stack/providers/utils/sqlstore/sqlstore.py index 29041e96c..fc44f196b 100644 --- a/llama_stack/providers/utils/sqlstore/sqlstore.py +++ b/llama_stack/providers/utils/sqlstore/sqlstore.py @@ -30,8 +30,8 @@ class SqlAlchemySqlStoreConfig(BaseModel): def engine_str(self) -> str: ... # TODO: move this when we have a better way to specify dependencies with internal APIs - @property - def pip_packages(self) -> list[str]: + @classmethod + def pip_packages(cls) -> list[str]: return ["sqlalchemy[asyncio]"] @@ -53,9 +53,9 @@ class SqliteSqlStoreConfig(SqlAlchemySqlStoreConfig): "db_path": "${env.SQLITE_STORE_DIR:=" + __distro_dir__ + "}/" + db_name, } - @property - def pip_packages(self) -> list[str]: - return super().pip_packages + ["aiosqlite"] + @classmethod + def pip_packages(cls) -> list[str]: + return super().pip_packages() + ["aiosqlite"] class PostgresSqlStoreConfig(SqlAlchemySqlStoreConfig): @@ -70,9 +70,9 @@ class PostgresSqlStoreConfig(SqlAlchemySqlStoreConfig): def engine_str(self) -> str: return f"postgresql+asyncpg://{self.user}:{self.password}@{self.host}:{self.port}/{self.db}" - @property - def pip_packages(self) -> list[str]: - return super().pip_packages + ["asyncpg"] + @classmethod + def pip_packages(cls) -> list[str]: + return super().pip_packages() + ["asyncpg"] @classmethod def sample_run_config(cls, **kwargs): diff --git a/llama_stack/templates/starter/starter.py b/llama_stack/templates/starter/starter.py index 7914d4298..2a982bb62 100644 --- a/llama_stack/templates/starter/starter.py +++ b/llama_stack/templates/starter/starter.py @@ -234,7 +234,6 @@ def get_distribution_template() -> DistributionTemplate: default_models = get_model_registry(available_models) - postgres_store = PostgresSqlStoreConfig.sample_run_config() return DistributionTemplate( name=name, distro_type="self_hosted", @@ -243,7 +242,7 @@ def get_distribution_template() -> DistributionTemplate: template_path=None, providers=providers, available_models_by_provider=available_models, - additional_pip_packages=postgres_store.pip_packages, + additional_pip_packages=PostgresSqlStoreConfig.pip_packages(), run_configs={ "run.yaml": RunConfigSettings( provider_overrides={ diff --git a/llama_stack/templates/template.py b/llama_stack/templates/template.py index 7badff140..1a0cbe5bc 100644 --- a/llama_stack/templates/template.py +++ b/llama_stack/templates/template.py @@ -4,6 +4,7 @@ # This source code is licensed under the terms described in the LICENSE file in # the root directory of this source tree. +import os from pathlib import Path from typing import Literal @@ -94,12 +95,14 @@ class RunConfigSettings(BaseModel): self, name: str, providers: dict[str, list[str]], + yaml_output_dir: Path | None = None, container_image: str | None = None, ) -> StackRunConfig: provider_registry = get_provider_registry() provider_configs = {} for api_str, provider_types in providers.items(): + # TODO: is this necessary with provider configs? all this does is allow you to hardcode a provider in the `get_distribution_template` if api_providers := self.provider_overrides.get(api_str): provider_configs[api_str] = api_providers continue @@ -123,11 +126,28 @@ class RunConfigSettings(BaseModel): else: config = {} + template_path = None + if yaml_output_dir and config: + path = os.path.join(yaml_output_dir, "provider_configs", api_str, f"{provider_id}.yaml") + template_path = os.path.join( + "~/.llama/distributions", + yaml_output_dir.name, + "provider_configs", + api_str, + f"{provider_id}.yaml", + ) + os.makedirs(os.path.dirname(path), exist_ok=True) + with open(path, "w") as f: + yaml.safe_dump( + config, + f, + sort_keys=False, + ) provider_configs[api_str].append( Provider( provider_id=provider_id, provider_type=provider_type, - config=config, + config=template_path if template_path is not None else config, ) ) @@ -191,7 +211,7 @@ class DistributionTemplate(BaseModel): # We should have a better way to do this by formalizing the concept of "internal" APIs # and providers, with a way to specify dependencies for them. if run_config_.inference_store: - additional_pip_packages.extend(run_config_.inference_store.pip_packages) + additional_pip_packages.extend(run_config_.inference_store.pip_packages()) if run_config_.metadata_store: additional_pip_packages.extend(run_config_.metadata_store.pip_packages) @@ -283,10 +303,21 @@ class DistributionTemplate(BaseModel): ) for yaml_pth, settings in self.run_configs.items(): - run_config = settings.run_config(self.name, self.providers, self.container_image) + run_config = settings.run_config(self.name, self.providers, yaml_output_dir, self.container_image) with open(yaml_output_dir / yaml_pth, "w") as f: + + def stringify_paths(obj): + if isinstance(obj, dict): + return {k: stringify_paths(v) for k, v in obj.items()} + elif isinstance(obj, list): + return [stringify_paths(v) for v in obj] + elif isinstance(obj, Path): + return str(obj) + else: + return obj + yaml.safe_dump( - run_config.model_dump(exclude_none=True), + stringify_paths(run_config.model_dump(exclude_none=True)), f, sort_keys=False, ) From 2f994cfc500a1197d53035a1364d088658a3c03f Mon Sep 17 00:00:00 2001 From: Charlie Doern Date: Wed, 2 Jul 2025 13:21:59 -0400 Subject: [PATCH 3/3] feat: regenerate all templates using the new template.py, regenerate all distros and their new provider configs Signed-off-by: Charlie Doern --- .../bedrock/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/bedrock/run.yaml | 43 +++------------ .../cerebras/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/cerebras/run.yaml | 46 ++++------------ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/ci-tests/run.yaml | 46 ++++------------ .../dell/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../templates/dell/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/dell/run.yaml | 46 ++++------------ .../provider_configs/__init__.py | 5 ++ .../experimental-post-training/run.yaml | 53 ++++--------------- .../fireworks/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../tool_runtime/wolfram-alpha.yaml | 1 + .../templates/fireworks/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/fireworks/run.yaml | 49 ++++------------- .../groq/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../provider_configs/vector_io/faiss.yaml | 4 ++ llama_stack/templates/groq/run.yaml | 52 ++++-------------- .../hf-endpoint/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../hf-endpoint/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/hf-endpoint/run.yaml | 46 ++++------------ .../provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../hf-serverless/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/hf-serverless/run.yaml | 46 ++++------------ .../llama_api/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/llama_api/run.yaml | 46 ++++------------ .../provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../meta-reference-gpu/run-with-safety.yaml | 46 ++++------------ .../templates/meta-reference-gpu/run.yaml | 46 ++++------------ .../nvidia/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/datasetio/nvidia.yaml | 4 ++ .../post_training/nvidia.yaml | 4 ++ .../provider_configs/safety/nvidia.yaml | 2 + .../telemetry/meta-reference.yaml | 3 ++ .../provider_configs/vector_io/faiss.yaml | 4 ++ .../templates/nvidia/run-with-safety.yaml | 42 +++------------ llama_stack/templates/nvidia/run.yaml | 30 ++--------- .../ollama/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../tool_runtime/wolfram-alpha.yaml | 1 + .../templates/ollama/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/ollama/run.yaml | 49 ++++------------- .../provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/open-benchmark/run.yaml | 46 ++++------------ .../passthrough/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../tool_runtime/wolfram-alpha.yaml | 1 + .../passthrough/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/passthrough/run.yaml | 49 ++++------------- .../provider_configs/__init__.py | 5 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/postgres-demo/run.yaml | 21 +++----- .../remote-vllm/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../tool_runtime/wolfram-alpha.yaml | 1 + .../remote-vllm/run-with-safety.yaml | 49 ++++------------- llama_stack/templates/remote-vllm/run.yaml | 49 ++++------------- .../sambanova/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../provider_configs/safety/sambanova.yaml | 2 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../tool_runtime/wolfram-alpha.yaml | 1 + llama_stack/templates/sambanova/run.yaml | 29 +++------- .../starter/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/starter/run.yaml | 46 ++++------------ .../tgi/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../templates/tgi/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/tgi/run.yaml | 46 ++++------------ .../together/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../tool_runtime/wolfram-alpha.yaml | 1 + .../templates/together/run-with-safety.yaml | 46 ++++------------ llama_stack/templates/together/run.yaml | 49 ++++------------- .../vllm-gpu/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + llama_stack/templates/vllm-gpu/run.yaml | 46 ++++------------ .../watsonx/provider_configs/__init__.py | 5 ++ .../agents/meta-reference.yaml | 7 +++ .../datasetio/huggingface.yaml | 4 ++ .../provider_configs/datasetio/localfs.yaml | 4 ++ .../provider_configs/eval/meta-reference.yaml | 4 ++ .../provider_configs/safety/llama-guard.yaml | 1 + .../provider_configs/scoring/braintrust.yaml | 1 + .../telemetry/meta-reference.yaml | 3 ++ .../tool_runtime/brave-search.yaml | 2 + .../tool_runtime/tavily-search.yaml | 2 + .../provider_configs/vector_io/faiss.yaml | 4 ++ llama_stack/templates/watsonx/run.yaml | 52 ++++-------------- 249 files changed, 1008 insertions(+), 1232 deletions(-) create mode 100644 llama_stack/templates/bedrock/provider_configs/__init__.py create mode 100644 llama_stack/templates/bedrock/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/bedrock/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/bedrock/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/bedrock/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/bedrock/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/bedrock/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/bedrock/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/bedrock/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/__init__.py create mode 100644 llama_stack/templates/cerebras/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/cerebras/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/ci-tests/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/dell/provider_configs/__init__.py create mode 100644 llama_stack/templates/dell/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/dell/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/dell/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/dell/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/dell/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/dell/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/dell/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/dell/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/dell/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/experimental-post-training/provider_configs/__init__.py create mode 100644 llama_stack/templates/fireworks/provider_configs/__init__.py create mode 100644 llama_stack/templates/fireworks/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/fireworks/provider_configs/tool_runtime/wolfram-alpha.yaml create mode 100644 llama_stack/templates/groq/provider_configs/__init__.py create mode 100644 llama_stack/templates/groq/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/groq/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/groq/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/groq/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/groq/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/groq/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/groq/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/groq/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/groq/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/groq/provider_configs/vector_io/faiss.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/__init__.py create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/__init__.py create mode 100644 llama_stack/templates/hf-serverless/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/hf-serverless/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/__init__.py create mode 100644 llama_stack/templates/llama_api/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/llama_api/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/__init__.py create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/nvidia/provider_configs/__init__.py create mode 100644 llama_stack/templates/nvidia/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/nvidia/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/nvidia/provider_configs/datasetio/nvidia.yaml create mode 100644 llama_stack/templates/nvidia/provider_configs/post_training/nvidia.yaml create mode 100644 llama_stack/templates/nvidia/provider_configs/safety/nvidia.yaml create mode 100644 llama_stack/templates/nvidia/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/nvidia/provider_configs/vector_io/faiss.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/__init__.py create mode 100644 llama_stack/templates/ollama/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/ollama/provider_configs/tool_runtime/wolfram-alpha.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/__init__.py create mode 100644 llama_stack/templates/open-benchmark/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/open-benchmark/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/__init__.py create mode 100644 llama_stack/templates/passthrough/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/passthrough/provider_configs/tool_runtime/wolfram-alpha.yaml create mode 100644 llama_stack/templates/postgres-demo/provider_configs/__init__.py create mode 100644 llama_stack/templates/postgres-demo/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/postgres-demo/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/postgres-demo/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/__init__.py create mode 100644 llama_stack/templates/remote-vllm/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/remote-vllm/provider_configs/tool_runtime/wolfram-alpha.yaml create mode 100644 llama_stack/templates/sambanova/provider_configs/__init__.py create mode 100644 llama_stack/templates/sambanova/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/sambanova/provider_configs/safety/sambanova.yaml create mode 100644 llama_stack/templates/sambanova/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/sambanova/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/sambanova/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/sambanova/provider_configs/tool_runtime/wolfram-alpha.yaml create mode 100644 llama_stack/templates/starter/provider_configs/__init__.py create mode 100644 llama_stack/templates/starter/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/starter/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/starter/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/starter/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/starter/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/starter/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/starter/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/starter/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/starter/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/__init__.py create mode 100644 llama_stack/templates/tgi/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/tgi/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/together/provider_configs/__init__.py create mode 100644 llama_stack/templates/together/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/together/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/together/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/together/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/together/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/together/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/together/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/together/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/together/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/together/provider_configs/tool_runtime/wolfram-alpha.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/__init__.py create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/__init__.py create mode 100644 llama_stack/templates/watsonx/provider_configs/agents/meta-reference.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/datasetio/huggingface.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/datasetio/localfs.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/eval/meta-reference.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/safety/llama-guard.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/scoring/braintrust.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/telemetry/meta-reference.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/tool_runtime/brave-search.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/tool_runtime/tavily-search.yaml create mode 100644 llama_stack/templates/watsonx/provider_configs/vector_io/faiss.yaml diff --git a/llama_stack/templates/bedrock/provider_configs/__init__.py b/llama_stack/templates/bedrock/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/bedrock/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/bedrock/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..758854acb --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/responses_store.db diff --git a/llama_stack/templates/bedrock/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/bedrock/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..402f61855 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/huggingface_datasetio.db diff --git a/llama_stack/templates/bedrock/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/bedrock/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..2ef1a6551 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/localfs_datasetio.db diff --git a/llama_stack/templates/bedrock/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/bedrock/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..c81006620 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/meta_reference_eval.db diff --git a/llama_stack/templates/bedrock/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/bedrock/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/bedrock/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/bedrock/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..942480ebe --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/trace_store.db diff --git a/llama_stack/templates/bedrock/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/bedrock/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/bedrock/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/bedrock/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/bedrock/run.yaml b/llama_stack/templates/bedrock/run.yaml index f12c5bec5..f1d42a3f4 100644 --- a/llama_stack/templates/bedrock/run.yaml +++ b/llama_stack/templates/bedrock/run.yaml @@ -30,44 +30,22 @@ providers: agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/responses_store.db + config: ~/.llama/distributions/bedrock/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/trace_store.db + config: ~/.llama/distributions/bedrock/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/meta_reference_eval.db + config: ~/.llama/distributions/bedrock/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/huggingface_datasetio.db + config: ~/.llama/distributions/bedrock/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/localfs_datasetio.db + config: ~/.llama/distributions/bedrock/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -77,19 +55,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/bedrock/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/bedrock/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/bedrock/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/cerebras/provider_configs/__init__.py b/llama_stack/templates/cerebras/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/cerebras/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/cerebras/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..8da139a08 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/responses_store.db diff --git a/llama_stack/templates/cerebras/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/cerebras/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..e5ddcbf98 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/huggingface_datasetio.db diff --git a/llama_stack/templates/cerebras/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/cerebras/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..3bfb0770a --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/localfs_datasetio.db diff --git a/llama_stack/templates/cerebras/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/cerebras/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..c9e8c378f --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/meta_reference_eval.db diff --git a/llama_stack/templates/cerebras/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/cerebras/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/cerebras/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/cerebras/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/cerebras/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/cerebras/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..da1ed636b --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/trace_store.db diff --git a/llama_stack/templates/cerebras/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/cerebras/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/cerebras/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/cerebras/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/cerebras/run.yaml b/llama_stack/templates/cerebras/run.yaml index c3877ddce..b23f9e534 100644 --- a/llama_stack/templates/cerebras/run.yaml +++ b/llama_stack/templates/cerebras/run.yaml @@ -23,8 +23,7 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/cerebras/provider_configs/safety/llama-guard.yaml vector_io: - provider_id: faiss provider_type: inline::faiss @@ -36,37 +35,18 @@ providers: agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/responses_store.db + config: ~/.llama/distributions/cerebras/provider_configs/agents/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/meta_reference_eval.db + config: ~/.llama/distributions/cerebras/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/huggingface_datasetio.db + config: ~/.llama/distributions/cerebras/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/localfs_datasetio.db + config: ~/.llama/distributions/cerebras/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -76,26 +56,18 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/cerebras/provider_configs/scoring/braintrust.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/trace_store.db + config: ~/.llama/distributions/cerebras/provider_configs/telemetry/meta-reference.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/cerebras/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/cerebras/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/ci-tests/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/ci-tests/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..8634adaf8 --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/responses_store.db diff --git a/llama_stack/templates/ci-tests/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/ci-tests/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..f8534d9a0 --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/huggingface_datasetio.db diff --git a/llama_stack/templates/ci-tests/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/ci-tests/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..d06fa6166 --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/localfs_datasetio.db diff --git a/llama_stack/templates/ci-tests/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/ci-tests/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..8e285916c --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/meta_reference_eval.db diff --git a/llama_stack/templates/ci-tests/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/ci-tests/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/ci-tests/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/ci-tests/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/ci-tests/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/ci-tests/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..120687eca --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/trace_store.db diff --git a/llama_stack/templates/ci-tests/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/ci-tests/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/ci-tests/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/ci-tests/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/ci-tests/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/ci-tests/run.yaml b/llama_stack/templates/ci-tests/run.yaml index a38d09324..6791035f4 100644 --- a/llama_stack/templates/ci-tests/run.yaml +++ b/llama_stack/templates/ci-tests/run.yaml @@ -28,49 +28,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/ci-tests/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/responses_store.db + config: ~/.llama/distributions/ci-tests/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/trace_store.db + config: ~/.llama/distributions/ci-tests/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/meta_reference_eval.db + config: ~/.llama/distributions/ci-tests/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/huggingface_datasetio.db + config: ~/.llama/distributions/ci-tests/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ci-tests}/localfs_datasetio.db + config: ~/.llama/distributions/ci-tests/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -80,19 +57,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/ci-tests/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/ci-tests/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/ci-tests/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/dell/provider_configs/__init__.py b/llama_stack/templates/dell/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/dell/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/dell/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..c3d5681ea --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/responses_store.db diff --git a/llama_stack/templates/dell/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/dell/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..788546878 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/huggingface_datasetio.db diff --git a/llama_stack/templates/dell/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/dell/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..35b5d91d6 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/localfs_datasetio.db diff --git a/llama_stack/templates/dell/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/dell/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..75764770b --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/meta_reference_eval.db diff --git a/llama_stack/templates/dell/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/dell/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/dell/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/dell/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/dell/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/dell/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..44eaa88d2 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/trace_store.db diff --git a/llama_stack/templates/dell/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/dell/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/dell/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/dell/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/dell/run-with-safety.yaml b/llama_stack/templates/dell/run-with-safety.yaml index 48639c772..837520f4d 100644 --- a/llama_stack/templates/dell/run-with-safety.yaml +++ b/llama_stack/templates/dell/run-with-safety.yaml @@ -31,49 +31,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/dell/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/responses_store.db + config: ~/.llama/distributions/dell/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/trace_store.db + config: ~/.llama/distributions/dell/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/meta_reference_eval.db + config: ~/.llama/distributions/dell/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/huggingface_datasetio.db + config: ~/.llama/distributions/dell/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/localfs_datasetio.db + config: ~/.llama/distributions/dell/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -83,19 +60,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/dell/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/dell/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/dell/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/dell/run.yaml b/llama_stack/templates/dell/run.yaml index 13d43530b..c827e6de9 100644 --- a/llama_stack/templates/dell/run.yaml +++ b/llama_stack/templates/dell/run.yaml @@ -27,49 +27,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/dell/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/responses_store.db + config: ~/.llama/distributions/dell/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/trace_store.db + config: ~/.llama/distributions/dell/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/meta_reference_eval.db + config: ~/.llama/distributions/dell/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/huggingface_datasetio.db + config: ~/.llama/distributions/dell/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/dell}/localfs_datasetio.db + config: ~/.llama/distributions/dell/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -79,19 +56,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/dell/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/dell/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/dell/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/experimental-post-training/provider_configs/__init__.py b/llama_stack/templates/experimental-post-training/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/experimental-post-training/run.yaml b/llama_stack/templates/experimental-post-training/run.yaml index a74aa3647..d165cec55 100644 --- a/llama_stack/templates/experimental-post-training/run.yaml +++ b/llama_stack/templates/experimental-post-training/run.yaml @@ -17,82 +17,49 @@ providers: inference: - provider_id: meta-reference-inference provider_type: inline::meta-reference - config: - max_seq_len: 4096 - checkpoint_dir: null - create_distributed_process_group: False + config: ~/.llama/distributions/experimental-post-training/provider_configs/meta-reference-inference.yaml - provider_id: ollama provider_type: remote::ollama - config: - url: ${env.OLLAMA_URL:=http://localhost:11434} + config: ~/.llama/distributions/experimental-post-training/provider_configs/ollama.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/meta_reference_eval.db + config: ~/.llama/distributions/experimental-post-training/provider_configs/meta-reference-eval.yaml scoring: - provider_id: basic provider_type: inline::basic - config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:+} + config: ~/.llama/distributions/experimental-post-training/provider_configs/braintrust.yaml datasetio: - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/experimental-post-training}/localfs_datasetio.db + config: ~/.llama/distributions/experimental-post-training/provider_configs/localfs.yaml - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/huggingface}/huggingface_datasetio.db + config: ~/.llama/distributions/experimental-post-training/provider_configs/huggingface.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: {} post_training: - provider_id: huggingface provider_type: inline::huggingface - config: - checkpoint_format: huggingface - distributed_backend: null - device: cpu + config: ~/.llama/distributions/experimental-post-training/provider_configs/huggingface-post-training.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/experimental-post-training}/agents_store.db + config: ~/.llama/distributions/experimental-post-training/provider_configs/meta-reference-agents.yaml safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: {} vector_io: - provider_id: faiss provider_type: inline::faiss - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/experimental-post-training}/faiss_store.db + config: ~/.llama/distributions/experimental-post-training/provider_configs/faiss.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:+} - max_results: 3 + config: ~/.llama/distributions/experimental-post-training/provider_configs/brave-search.yaml metadata_store: diff --git a/llama_stack/templates/fireworks/provider_configs/__init__.py b/llama_stack/templates/fireworks/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/fireworks/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/fireworks/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..c65c3dcde --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/responses_store.db diff --git a/llama_stack/templates/fireworks/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/fireworks/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..0216e32eb --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/huggingface_datasetio.db diff --git a/llama_stack/templates/fireworks/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/fireworks/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..211bede41 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/localfs_datasetio.db diff --git a/llama_stack/templates/fireworks/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/fireworks/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..d5117c8c5 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/meta_reference_eval.db diff --git a/llama_stack/templates/fireworks/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/fireworks/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/fireworks/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/fireworks/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/fireworks/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/fireworks/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..a81e7a720 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/trace_store.db diff --git a/llama_stack/templates/fireworks/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/fireworks/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/fireworks/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/fireworks/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/fireworks/provider_configs/tool_runtime/wolfram-alpha.yaml b/llama_stack/templates/fireworks/provider_configs/tool_runtime/wolfram-alpha.yaml new file mode 100644 index 000000000..a295808f5 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/tool_runtime/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} diff --git a/llama_stack/templates/fireworks/run-with-safety.yaml b/llama_stack/templates/fireworks/run-with-safety.yaml index ecb53a18d..fdc2bd9b6 100644 --- a/llama_stack/templates/fireworks/run-with-safety.yaml +++ b/llama_stack/templates/fireworks/run-with-safety.yaml @@ -42,44 +42,22 @@ providers: agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/responses_store.db + config: ~/.llama/distributions/fireworks/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/trace_store.db + config: ~/.llama/distributions/fireworks/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/meta_reference_eval.db + config: ~/.llama/distributions/fireworks/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/huggingface_datasetio.db + config: ~/.llama/distributions/fireworks/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/localfs_datasetio.db + config: ~/.llama/distributions/fireworks/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -89,8 +67,7 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/fireworks/provider_configs/scoring/braintrust.yaml files: - provider_id: meta-reference-files provider_type: inline::localfs @@ -102,18 +79,13 @@ providers: tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/fireworks/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/fireworks/provider_configs/tool_runtime/tavily-search.yaml - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/fireworks/provider_configs/tool_runtime/wolfram-alpha.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/fireworks/run.yaml b/llama_stack/templates/fireworks/run.yaml index 298d28d52..f396c5a1e 100644 --- a/llama_stack/templates/fireworks/run.yaml +++ b/llama_stack/templates/fireworks/run.yaml @@ -32,49 +32,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/fireworks/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/responses_store.db + config: ~/.llama/distributions/fireworks/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/trace_store.db + config: ~/.llama/distributions/fireworks/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/meta_reference_eval.db + config: ~/.llama/distributions/fireworks/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/huggingface_datasetio.db + config: ~/.llama/distributions/fireworks/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/localfs_datasetio.db + config: ~/.llama/distributions/fireworks/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -84,8 +61,7 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/fireworks/provider_configs/scoring/braintrust.yaml files: - provider_id: meta-reference-files provider_type: inline::localfs @@ -97,18 +73,13 @@ providers: tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/fireworks/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/fireworks/provider_configs/tool_runtime/tavily-search.yaml - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/fireworks/provider_configs/tool_runtime/wolfram-alpha.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/groq/provider_configs/__init__.py b/llama_stack/templates/groq/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/groq/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/groq/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..ac4887d2e --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/responses_store.db diff --git a/llama_stack/templates/groq/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/groq/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..7d1f11e0d --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/huggingface_datasetio.db diff --git a/llama_stack/templates/groq/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/groq/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..7d4c3a062 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/localfs_datasetio.db diff --git a/llama_stack/templates/groq/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/groq/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..b38cb314e --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/meta_reference_eval.db diff --git a/llama_stack/templates/groq/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/groq/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/groq/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/groq/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/groq/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/groq/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..719068e08 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/trace_store.db diff --git a/llama_stack/templates/groq/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/groq/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/groq/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/groq/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/groq/provider_configs/vector_io/faiss.yaml b/llama_stack/templates/groq/provider_configs/vector_io/faiss.yaml new file mode 100644 index 000000000..6c67fc2b0 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/vector_io/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/faiss_store.db diff --git a/llama_stack/templates/groq/run.yaml b/llama_stack/templates/groq/run.yaml index 13bb65ed2..f64daf6ad 100644 --- a/llama_stack/templates/groq/run.yaml +++ b/llama_stack/templates/groq/run.yaml @@ -23,57 +23,30 @@ providers: vector_io: - provider_id: faiss provider_type: inline::faiss - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/faiss_store.db + config: ~/.llama/distributions/groq/provider_configs/vector_io/faiss.yaml safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/groq/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/responses_store.db + config: ~/.llama/distributions/groq/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/trace_store.db + config: ~/.llama/distributions/groq/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/meta_reference_eval.db + config: ~/.llama/distributions/groq/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/huggingface_datasetio.db + config: ~/.llama/distributions/groq/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/groq}/localfs_datasetio.db + config: ~/.llama/distributions/groq/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -83,19 +56,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/groq/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/groq/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/groq/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/hf-endpoint/provider_configs/__init__.py b/llama_stack/templates/hf-endpoint/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/hf-endpoint/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/hf-endpoint/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..be0bdc58d --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/responses_store.db diff --git a/llama_stack/templates/hf-endpoint/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/hf-endpoint/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..ce0d8a8c5 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/huggingface_datasetio.db diff --git a/llama_stack/templates/hf-endpoint/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/hf-endpoint/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..29b0f2460 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/localfs_datasetio.db diff --git a/llama_stack/templates/hf-endpoint/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/hf-endpoint/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..99d93e306 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/meta_reference_eval.db diff --git a/llama_stack/templates/hf-endpoint/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/hf-endpoint/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/hf-endpoint/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/hf-endpoint/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/hf-endpoint/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/hf-endpoint/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..bcdc0d998 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/trace_store.db diff --git a/llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/hf-endpoint/run-with-safety.yaml b/llama_stack/templates/hf-endpoint/run-with-safety.yaml index b2bc6a8e9..eaa5af18b 100644 --- a/llama_stack/templates/hf-endpoint/run-with-safety.yaml +++ b/llama_stack/templates/hf-endpoint/run-with-safety.yaml @@ -36,49 +36,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/hf-endpoint/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/responses_store.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/trace_store.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/meta_reference_eval.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/huggingface_datasetio.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/localfs_datasetio.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -88,19 +65,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/hf-endpoint/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-endpoint/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-endpoint/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/hf-endpoint/run.yaml b/llama_stack/templates/hf-endpoint/run.yaml index d62921ccc..9b5528cc2 100644 --- a/llama_stack/templates/hf-endpoint/run.yaml +++ b/llama_stack/templates/hf-endpoint/run.yaml @@ -31,49 +31,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/hf-endpoint/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/responses_store.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/trace_store.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/meta_reference_eval.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/huggingface_datasetio.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/localfs_datasetio.db + config: ~/.llama/distributions/hf-endpoint/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -83,19 +60,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/hf-endpoint/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-endpoint/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-endpoint/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/hf-serverless/provider_configs/__init__.py b/llama_stack/templates/hf-serverless/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/hf-serverless/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/hf-serverless/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..cd9610cba --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/responses_store.db diff --git a/llama_stack/templates/hf-serverless/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/hf-serverless/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..c44c6efdf --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/huggingface_datasetio.db diff --git a/llama_stack/templates/hf-serverless/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/hf-serverless/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..b871028ce --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/localfs_datasetio.db diff --git a/llama_stack/templates/hf-serverless/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/hf-serverless/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..1fa1f67c8 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/meta_reference_eval.db diff --git a/llama_stack/templates/hf-serverless/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/hf-serverless/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/hf-serverless/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/hf-serverless/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/hf-serverless/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/hf-serverless/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..af9659004 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/trace_store.db diff --git a/llama_stack/templates/hf-serverless/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/hf-serverless/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/hf-serverless/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/hf-serverless/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/hf-serverless/run-with-safety.yaml b/llama_stack/templates/hf-serverless/run-with-safety.yaml index d7ff4f446..455a190e8 100644 --- a/llama_stack/templates/hf-serverless/run-with-safety.yaml +++ b/llama_stack/templates/hf-serverless/run-with-safety.yaml @@ -36,49 +36,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/hf-serverless/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/responses_store.db + config: ~/.llama/distributions/hf-serverless/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/trace_store.db + config: ~/.llama/distributions/hf-serverless/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/meta_reference_eval.db + config: ~/.llama/distributions/hf-serverless/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/huggingface_datasetio.db + config: ~/.llama/distributions/hf-serverless/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/localfs_datasetio.db + config: ~/.llama/distributions/hf-serverless/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -88,19 +65,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/hf-serverless/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-serverless/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-serverless/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/hf-serverless/run.yaml b/llama_stack/templates/hf-serverless/run.yaml index 19484cba6..f50ba84fa 100644 --- a/llama_stack/templates/hf-serverless/run.yaml +++ b/llama_stack/templates/hf-serverless/run.yaml @@ -31,49 +31,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/hf-serverless/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/responses_store.db + config: ~/.llama/distributions/hf-serverless/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/trace_store.db + config: ~/.llama/distributions/hf-serverless/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/meta_reference_eval.db + config: ~/.llama/distributions/hf-serverless/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/huggingface_datasetio.db + config: ~/.llama/distributions/hf-serverless/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/localfs_datasetio.db + config: ~/.llama/distributions/hf-serverless/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -83,19 +60,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/hf-serverless/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-serverless/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/hf-serverless/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/llama_api/provider_configs/__init__.py b/llama_stack/templates/llama_api/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/llama_api/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/llama_api/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..c790d9378 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/responses_store.db diff --git a/llama_stack/templates/llama_api/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/llama_api/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..114aa1eca --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/huggingface_datasetio.db diff --git a/llama_stack/templates/llama_api/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/llama_api/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..00f729f4e --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/localfs_datasetio.db diff --git a/llama_stack/templates/llama_api/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/llama_api/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..6b54b7284 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/meta_reference_eval.db diff --git a/llama_stack/templates/llama_api/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/llama_api/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/llama_api/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/llama_api/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/llama_api/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/llama_api/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..2874a7038 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/trace_store.db diff --git a/llama_stack/templates/llama_api/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/llama_api/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/llama_api/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/llama_api/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/llama_api/run.yaml b/llama_stack/templates/llama_api/run.yaml index 3bfb284a3..c1decb3f4 100644 --- a/llama_stack/templates/llama_api/run.yaml +++ b/llama_stack/templates/llama_api/run.yaml @@ -40,49 +40,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/llama_api/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/responses_store.db + config: ~/.llama/distributions/llama_api/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/trace_store.db + config: ~/.llama/distributions/llama_api/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/meta_reference_eval.db + config: ~/.llama/distributions/llama_api/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/huggingface_datasetio.db + config: ~/.llama/distributions/llama_api/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/localfs_datasetio.db + config: ~/.llama/distributions/llama_api/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -92,19 +69,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/llama_api/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/llama_api/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/llama_api/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/__init__.py b/llama_stack/templates/meta-reference-gpu/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..8e2ce6e50 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/responses_store.db diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..3287bf2a7 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/huggingface_datasetio.db diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..701db0eb3 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/localfs_datasetio.db diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..bad24e17d --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/meta_reference_eval.db diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..57095ab2d --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/trace_store.db diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/meta-reference-gpu/run-with-safety.yaml b/llama_stack/templates/meta-reference-gpu/run-with-safety.yaml index 46b3a33a6..0e92a5635 100644 --- a/llama_stack/templates/meta-reference-gpu/run-with-safety.yaml +++ b/llama_stack/templates/meta-reference-gpu/run-with-safety.yaml @@ -46,49 +46,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/responses_store.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/trace_store.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/meta_reference_eval.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/huggingface_datasetio.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/localfs_datasetio.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -98,19 +75,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/meta-reference-gpu/run.yaml b/llama_stack/templates/meta-reference-gpu/run.yaml index 033ec245a..5e1c19227 100644 --- a/llama_stack/templates/meta-reference-gpu/run.yaml +++ b/llama_stack/templates/meta-reference-gpu/run.yaml @@ -36,49 +36,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/responses_store.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/trace_store.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/meta_reference_eval.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/huggingface_datasetio.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/localfs_datasetio.db + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -88,19 +65,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/meta-reference-gpu/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/nvidia/provider_configs/__init__.py b/llama_stack/templates/nvidia/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/nvidia/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/nvidia/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..203edeced --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/responses_store.db diff --git a/llama_stack/templates/nvidia/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/nvidia/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..7aec4dacf --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/localfs_datasetio.db diff --git a/llama_stack/templates/nvidia/provider_configs/datasetio/nvidia.yaml b/llama_stack/templates/nvidia/provider_configs/datasetio/nvidia.yaml new file mode 100644 index 000000000..e993c446d --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/datasetio/nvidia.yaml @@ -0,0 +1,4 @@ +api_key: ${env.NVIDIA_API_KEY:=} +dataset_namespace: ${env.NVIDIA_DATASET_NAMESPACE:=default} +project_id: ${env.NVIDIA_PROJECT_ID:=test-project} +datasets_url: ${env.NVIDIA_DATASETS_URL:=http://nemo.test} diff --git a/llama_stack/templates/nvidia/provider_configs/post_training/nvidia.yaml b/llama_stack/templates/nvidia/provider_configs/post_training/nvidia.yaml new file mode 100644 index 000000000..a1b2df497 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/post_training/nvidia.yaml @@ -0,0 +1,4 @@ +api_key: ${env.NVIDIA_API_KEY:=} +dataset_namespace: ${env.NVIDIA_DATASET_NAMESPACE:=default} +project_id: ${env.NVIDIA_PROJECT_ID:=test-project} +customizer_url: ${env.NVIDIA_CUSTOMIZER_URL:=http://nemo.test} diff --git a/llama_stack/templates/nvidia/provider_configs/safety/nvidia.yaml b/llama_stack/templates/nvidia/provider_configs/safety/nvidia.yaml new file mode 100644 index 000000000..13453ee29 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/safety/nvidia.yaml @@ -0,0 +1,2 @@ +guardrails_service_url: ${env.GUARDRAILS_SERVICE_URL:=http://localhost:7331} +config_id: ${env.NVIDIA_GUARDRAILS_CONFIG_ID:=self-check} diff --git a/llama_stack/templates/nvidia/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/nvidia/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..f7fcf1b91 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/trace_store.db diff --git a/llama_stack/templates/nvidia/provider_configs/vector_io/faiss.yaml b/llama_stack/templates/nvidia/provider_configs/vector_io/faiss.yaml new file mode 100644 index 000000000..b86ac6d54 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/vector_io/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/faiss_store.db diff --git a/llama_stack/templates/nvidia/run-with-safety.yaml b/llama_stack/templates/nvidia/run-with-safety.yaml index 73783be98..687bcf21a 100644 --- a/llama_stack/templates/nvidia/run-with-safety.yaml +++ b/llama_stack/templates/nvidia/run-with-safety.yaml @@ -27,35 +27,19 @@ providers: vector_io: - provider_id: faiss provider_type: inline::faiss - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/faiss_store.db + config: ~/.llama/distributions/nvidia/provider_configs/vector_io/faiss.yaml safety: - provider_id: nvidia provider_type: remote::nvidia - config: - guardrails_service_url: ${env.GUARDRAILS_SERVICE_URL:=http://localhost:7331} - config_id: ${env.NVIDIA_GUARDRAILS_CONFIG_ID:=self-check} + config: ~/.llama/distributions/nvidia/provider_configs/safety/nvidia.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/responses_store.db + config: ~/.llama/distributions/nvidia/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/trace_store.db + config: ~/.llama/distributions/nvidia/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: nvidia provider_type: remote::nvidia @@ -64,26 +48,14 @@ providers: post_training: - provider_id: nvidia provider_type: remote::nvidia - config: - api_key: ${env.NVIDIA_API_KEY:=} - dataset_namespace: ${env.NVIDIA_DATASET_NAMESPACE:=default} - project_id: ${env.NVIDIA_PROJECT_ID:=test-project} - customizer_url: ${env.NVIDIA_CUSTOMIZER_URL:=http://nemo.test} + config: ~/.llama/distributions/nvidia/provider_configs/post_training/nvidia.yaml datasetio: - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/localfs_datasetio.db + config: ~/.llama/distributions/nvidia/provider_configs/datasetio/localfs.yaml - provider_id: nvidia provider_type: remote::nvidia - config: - api_key: ${env.NVIDIA_API_KEY:=} - dataset_namespace: ${env.NVIDIA_DATASET_NAMESPACE:=default} - project_id: ${env.NVIDIA_PROJECT_ID:=test-project} - datasets_url: ${env.NVIDIA_DATASETS_URL:=http://nemo.test} + config: ~/.llama/distributions/nvidia/provider_configs/datasetio/nvidia.yaml scoring: - provider_id: basic provider_type: inline::basic diff --git a/llama_stack/templates/nvidia/run.yaml b/llama_stack/templates/nvidia/run.yaml index af9d5904a..4e70ab588 100644 --- a/llama_stack/templates/nvidia/run.yaml +++ b/llama_stack/templates/nvidia/run.yaml @@ -22,35 +22,19 @@ providers: vector_io: - provider_id: faiss provider_type: inline::faiss - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/faiss_store.db + config: ~/.llama/distributions/nvidia/provider_configs/vector_io/faiss.yaml safety: - provider_id: nvidia provider_type: remote::nvidia - config: - guardrails_service_url: ${env.GUARDRAILS_SERVICE_URL:=http://localhost:7331} - config_id: ${env.NVIDIA_GUARDRAILS_CONFIG_ID:=self-check} + config: ~/.llama/distributions/nvidia/provider_configs/safety/nvidia.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/responses_store.db + config: ~/.llama/distributions/nvidia/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/nvidia}/trace_store.db + config: ~/.llama/distributions/nvidia/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: nvidia provider_type: remote::nvidia @@ -59,11 +43,7 @@ providers: post_training: - provider_id: nvidia provider_type: remote::nvidia - config: - api_key: ${env.NVIDIA_API_KEY:=} - dataset_namespace: ${env.NVIDIA_DATASET_NAMESPACE:=default} - project_id: ${env.NVIDIA_PROJECT_ID:=test-project} - customizer_url: ${env.NVIDIA_CUSTOMIZER_URL:=http://nemo.test} + config: ~/.llama/distributions/nvidia/provider_configs/post_training/nvidia.yaml datasetio: - provider_id: nvidia provider_type: remote::nvidia diff --git a/llama_stack/templates/ollama/provider_configs/__init__.py b/llama_stack/templates/ollama/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/ollama/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/ollama/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..0679eda58 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/responses_store.db diff --git a/llama_stack/templates/ollama/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/ollama/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..95667fb9c --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/huggingface_datasetio.db diff --git a/llama_stack/templates/ollama/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/ollama/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..1a38d1d6d --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/localfs_datasetio.db diff --git a/llama_stack/templates/ollama/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/ollama/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..f15c27f1f --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/meta_reference_eval.db diff --git a/llama_stack/templates/ollama/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/ollama/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/ollama/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/ollama/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/ollama/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/ollama/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..cd07ae79a --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/trace_store.db diff --git a/llama_stack/templates/ollama/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/ollama/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/ollama/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/ollama/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/ollama/provider_configs/tool_runtime/wolfram-alpha.yaml b/llama_stack/templates/ollama/provider_configs/tool_runtime/wolfram-alpha.yaml new file mode 100644 index 000000000..a295808f5 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/tool_runtime/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} diff --git a/llama_stack/templates/ollama/run-with-safety.yaml b/llama_stack/templates/ollama/run-with-safety.yaml index bad51de09..62ff7124e 100644 --- a/llama_stack/templates/ollama/run-with-safety.yaml +++ b/llama_stack/templates/ollama/run-with-safety.yaml @@ -37,44 +37,22 @@ providers: agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/responses_store.db + config: ~/.llama/distributions/ollama/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/trace_store.db + config: ~/.llama/distributions/ollama/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/meta_reference_eval.db + config: ~/.llama/distributions/ollama/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/huggingface_datasetio.db + config: ~/.llama/distributions/ollama/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/localfs_datasetio.db + config: ~/.llama/distributions/ollama/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -84,8 +62,7 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/ollama/provider_configs/scoring/braintrust.yaml files: - provider_id: meta-reference-files provider_type: inline::localfs @@ -104,14 +81,10 @@ providers: tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/ollama/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/ollama/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -120,8 +93,7 @@ providers: config: {} - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/ollama/provider_configs/tool_runtime/wolfram-alpha.yaml metadata_store: type: sqlite db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/registry.db diff --git a/llama_stack/templates/ollama/run.yaml b/llama_stack/templates/ollama/run.yaml index e1dea730e..bd479ecf2 100644 --- a/llama_stack/templates/ollama/run.yaml +++ b/llama_stack/templates/ollama/run.yaml @@ -30,49 +30,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/ollama/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/responses_store.db + config: ~/.llama/distributions/ollama/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/trace_store.db + config: ~/.llama/distributions/ollama/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/meta_reference_eval.db + config: ~/.llama/distributions/ollama/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/huggingface_datasetio.db + config: ~/.llama/distributions/ollama/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/localfs_datasetio.db + config: ~/.llama/distributions/ollama/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -82,8 +59,7 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/ollama/provider_configs/scoring/braintrust.yaml files: - provider_id: meta-reference-files provider_type: inline::localfs @@ -102,14 +78,10 @@ providers: tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/ollama/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/ollama/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -118,8 +90,7 @@ providers: config: {} - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/ollama/provider_configs/tool_runtime/wolfram-alpha.yaml metadata_store: type: sqlite db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/registry.db diff --git a/llama_stack/templates/open-benchmark/provider_configs/__init__.py b/llama_stack/templates/open-benchmark/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/open-benchmark/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/open-benchmark/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..2a485e81e --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/responses_store.db diff --git a/llama_stack/templates/open-benchmark/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/open-benchmark/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..51d561c31 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/huggingface_datasetio.db diff --git a/llama_stack/templates/open-benchmark/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/open-benchmark/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..48a2d6855 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/localfs_datasetio.db diff --git a/llama_stack/templates/open-benchmark/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/open-benchmark/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..518d5f39e --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/meta_reference_eval.db diff --git a/llama_stack/templates/open-benchmark/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/open-benchmark/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/open-benchmark/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/open-benchmark/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/open-benchmark/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/open-benchmark/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..b6c90adeb --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/trace_store.db diff --git a/llama_stack/templates/open-benchmark/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/open-benchmark/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/open-benchmark/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/open-benchmark/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/open-benchmark/run.yaml b/llama_stack/templates/open-benchmark/run.yaml index 57ae6b9be..1e86d1e93 100644 --- a/llama_stack/templates/open-benchmark/run.yaml +++ b/llama_stack/templates/open-benchmark/run.yaml @@ -54,49 +54,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/open-benchmark/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/responses_store.db + config: ~/.llama/distributions/open-benchmark/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/trace_store.db + config: ~/.llama/distributions/open-benchmark/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/meta_reference_eval.db + config: ~/.llama/distributions/open-benchmark/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/huggingface_datasetio.db + config: ~/.llama/distributions/open-benchmark/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/localfs_datasetio.db + config: ~/.llama/distributions/open-benchmark/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -106,19 +83,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/open-benchmark/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/open-benchmark/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/open-benchmark/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/passthrough/provider_configs/__init__.py b/llama_stack/templates/passthrough/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/passthrough/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/passthrough/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..0f6400caf --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/responses_store.db diff --git a/llama_stack/templates/passthrough/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/passthrough/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..1420b3112 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/huggingface_datasetio.db diff --git a/llama_stack/templates/passthrough/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/passthrough/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..7b1e9d3dd --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/localfs_datasetio.db diff --git a/llama_stack/templates/passthrough/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/passthrough/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..eeabc8187 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/meta_reference_eval.db diff --git a/llama_stack/templates/passthrough/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/passthrough/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/passthrough/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/passthrough/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/passthrough/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/passthrough/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..00c5dcc38 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/trace_store.db diff --git a/llama_stack/templates/passthrough/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/passthrough/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/passthrough/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/passthrough/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/passthrough/provider_configs/tool_runtime/wolfram-alpha.yaml b/llama_stack/templates/passthrough/provider_configs/tool_runtime/wolfram-alpha.yaml new file mode 100644 index 000000000..a295808f5 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/tool_runtime/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} diff --git a/llama_stack/templates/passthrough/run-with-safety.yaml b/llama_stack/templates/passthrough/run-with-safety.yaml index 7a30f665c..9dc805ccf 100644 --- a/llama_stack/templates/passthrough/run-with-safety.yaml +++ b/llama_stack/templates/passthrough/run-with-safety.yaml @@ -41,44 +41,22 @@ providers: agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/responses_store.db + config: ~/.llama/distributions/passthrough/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/trace_store.db + config: ~/.llama/distributions/passthrough/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/meta_reference_eval.db + config: ~/.llama/distributions/passthrough/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/huggingface_datasetio.db + config: ~/.llama/distributions/passthrough/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/localfs_datasetio.db + config: ~/.llama/distributions/passthrough/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -88,23 +66,17 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/passthrough/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/passthrough/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/passthrough/provider_configs/tool_runtime/tavily-search.yaml - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/passthrough/provider_configs/tool_runtime/wolfram-alpha.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/passthrough/run.yaml b/llama_stack/templates/passthrough/run.yaml index dc751ea20..da7a3b9fa 100644 --- a/llama_stack/templates/passthrough/run.yaml +++ b/llama_stack/templates/passthrough/run.yaml @@ -31,49 +31,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/passthrough/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/responses_store.db + config: ~/.llama/distributions/passthrough/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/trace_store.db + config: ~/.llama/distributions/passthrough/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/meta_reference_eval.db + config: ~/.llama/distributions/passthrough/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/huggingface_datasetio.db + config: ~/.llama/distributions/passthrough/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/localfs_datasetio.db + config: ~/.llama/distributions/passthrough/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -83,23 +60,17 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/passthrough/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/passthrough/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/passthrough/provider_configs/tool_runtime/tavily-search.yaml - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/passthrough/provider_configs/tool_runtime/wolfram-alpha.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/postgres-demo/provider_configs/__init__.py b/llama_stack/templates/postgres-demo/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/postgres-demo/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/postgres-demo/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/postgres-demo/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/postgres-demo/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/postgres-demo/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/postgres-demo/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/postgres-demo/run.yaml b/llama_stack/templates/postgres-demo/run.yaml index 9f82bff60..84d154c31 100644 --- a/llama_stack/templates/postgres-demo/run.yaml +++ b/llama_stack/templates/postgres-demo/run.yaml @@ -27,8 +27,7 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/postgres-demo/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference @@ -57,14 +56,10 @@ providers: tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/postgres-demo/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/postgres-demo/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -81,11 +76,11 @@ metadata_store: table_name: ${env.POSTGRES_TABLE_NAME:=llamastack_kvstore} inference_store: type: postgres - host: ${env.POSTGRES_HOST:localhost} - port: ${env.POSTGRES_PORT:5432} - db: ${env.POSTGRES_DB:llamastack} - user: ${env.POSTGRES_USER:llamastack} - password: ${env.POSTGRES_PASSWORD:llamastack} + host: ${env.POSTGRES_HOST:=localhost} + port: ${env.POSTGRES_PORT:=5432} + db: ${env.POSTGRES_DB:=llamastack} + user: ${env.POSTGRES_USER:=llamastack} + password: ${env.POSTGRES_PASSWORD:=llamastack} models: - metadata: {} model_id: ${env.INFERENCE_MODEL} diff --git a/llama_stack/templates/remote-vllm/provider_configs/__init__.py b/llama_stack/templates/remote-vllm/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/remote-vllm/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/remote-vllm/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..794bbf532 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/responses_store.db diff --git a/llama_stack/templates/remote-vllm/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/remote-vllm/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..ba0ca92da --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/huggingface_datasetio.db diff --git a/llama_stack/templates/remote-vllm/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/remote-vllm/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..db2f3519c --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/localfs_datasetio.db diff --git a/llama_stack/templates/remote-vllm/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/remote-vllm/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..122f37ce5 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/meta_reference_eval.db diff --git a/llama_stack/templates/remote-vllm/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/remote-vllm/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/remote-vllm/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/remote-vllm/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/remote-vllm/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/remote-vllm/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..1452238df --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/trace_store.db diff --git a/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/wolfram-alpha.yaml b/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/wolfram-alpha.yaml new file mode 100644 index 000000000..a295808f5 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/tool_runtime/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} diff --git a/llama_stack/templates/remote-vllm/run-with-safety.yaml b/llama_stack/templates/remote-vllm/run-with-safety.yaml index 78fb22d38..fb52f1a50 100644 --- a/llama_stack/templates/remote-vllm/run-with-safety.yaml +++ b/llama_stack/templates/remote-vllm/run-with-safety.yaml @@ -40,42 +40,22 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/remote-vllm/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/responses_store.db + config: ~/.llama/distributions/remote-vllm/provider_configs/agents/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/meta_reference_eval.db + config: ~/.llama/distributions/remote-vllm/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/huggingface_datasetio.db + config: ~/.llama/distributions/remote-vllm/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/localfs_datasetio.db + config: ~/.llama/distributions/remote-vllm/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -85,26 +65,18 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/remote-vllm/provider_configs/scoring/braintrust.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/trace_store.db + config: ~/.llama/distributions/remote-vllm/provider_configs/telemetry/meta-reference.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/remote-vllm/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/remote-vllm/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -113,8 +85,7 @@ providers: config: {} - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/remote-vllm/provider_configs/tool_runtime/wolfram-alpha.yaml metadata_store: type: sqlite db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/registry.db diff --git a/llama_stack/templates/remote-vllm/run.yaml b/llama_stack/templates/remote-vllm/run.yaml index 1cc4596f3..a5c0d52d2 100644 --- a/llama_stack/templates/remote-vllm/run.yaml +++ b/llama_stack/templates/remote-vllm/run.yaml @@ -33,42 +33,22 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/remote-vllm/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/responses_store.db + config: ~/.llama/distributions/remote-vllm/provider_configs/agents/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/meta_reference_eval.db + config: ~/.llama/distributions/remote-vllm/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/huggingface_datasetio.db + config: ~/.llama/distributions/remote-vllm/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/localfs_datasetio.db + config: ~/.llama/distributions/remote-vllm/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -78,26 +58,18 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/remote-vllm/provider_configs/scoring/braintrust.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/trace_store.db + config: ~/.llama/distributions/remote-vllm/provider_configs/telemetry/meta-reference.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/remote-vllm/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/remote-vllm/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -106,8 +78,7 @@ providers: config: {} - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/remote-vllm/provider_configs/tool_runtime/wolfram-alpha.yaml metadata_store: type: sqlite db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/registry.db diff --git a/llama_stack/templates/sambanova/provider_configs/__init__.py b/llama_stack/templates/sambanova/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/sambanova/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/sambanova/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..b929a59ba --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/responses_store.db diff --git a/llama_stack/templates/sambanova/provider_configs/safety/sambanova.yaml b/llama_stack/templates/sambanova/provider_configs/safety/sambanova.yaml new file mode 100644 index 000000000..8d6b35315 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/safety/sambanova.yaml @@ -0,0 +1,2 @@ +url: https://api.sambanova.ai/v1 +api_key: ${env.SAMBANOVA_API_KEY} diff --git a/llama_stack/templates/sambanova/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/sambanova/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..8b8921dc0 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/trace_store.db diff --git a/llama_stack/templates/sambanova/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/sambanova/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/sambanova/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/sambanova/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/sambanova/provider_configs/tool_runtime/wolfram-alpha.yaml b/llama_stack/templates/sambanova/provider_configs/tool_runtime/wolfram-alpha.yaml new file mode 100644 index 000000000..a295808f5 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/tool_runtime/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} diff --git a/llama_stack/templates/sambanova/run.yaml b/llama_stack/templates/sambanova/run.yaml index 6163a58b3..8ece4cad5 100644 --- a/llama_stack/templates/sambanova/run.yaml +++ b/llama_stack/templates/sambanova/run.yaml @@ -40,38 +40,22 @@ providers: safety: - provider_id: sambanova provider_type: remote::sambanova - config: - url: https://api.sambanova.ai/v1 - api_key: ${env.SAMBANOVA_API_KEY} + config: ~/.llama/distributions/sambanova/provider_configs/safety/sambanova.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/responses_store.db + config: ~/.llama/distributions/sambanova/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/trace_store.db + config: ~/.llama/distributions/sambanova/provider_configs/telemetry/meta-reference.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/sambanova/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/sambanova/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -80,8 +64,7 @@ providers: config: {} - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/sambanova/provider_configs/tool_runtime/wolfram-alpha.yaml metadata_store: type: sqlite db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/registry.db diff --git a/llama_stack/templates/starter/provider_configs/__init__.py b/llama_stack/templates/starter/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/starter/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/starter/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..103f9426f --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/responses_store.db diff --git a/llama_stack/templates/starter/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/starter/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..b42e6830c --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/huggingface_datasetio.db diff --git a/llama_stack/templates/starter/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/starter/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..ea6de18ff --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/localfs_datasetio.db diff --git a/llama_stack/templates/starter/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/starter/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..152edee49 --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/meta_reference_eval.db diff --git a/llama_stack/templates/starter/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/starter/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/starter/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/starter/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/starter/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/starter/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..a074bcdea --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/trace_store.db diff --git a/llama_stack/templates/starter/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/starter/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/starter/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/starter/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/starter/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/starter/run.yaml b/llama_stack/templates/starter/run.yaml index 190030690..d8286fd00 100644 --- a/llama_stack/templates/starter/run.yaml +++ b/llama_stack/templates/starter/run.yaml @@ -103,49 +103,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/starter/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/responses_store.db + config: ~/.llama/distributions/starter/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/trace_store.db + config: ~/.llama/distributions/starter/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/meta_reference_eval.db + config: ~/.llama/distributions/starter/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/huggingface_datasetio.db + config: ~/.llama/distributions/starter/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/localfs_datasetio.db + config: ~/.llama/distributions/starter/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -155,19 +132,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/starter/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/starter/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/starter/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/tgi/provider_configs/__init__.py b/llama_stack/templates/tgi/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/tgi/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/tgi/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..c5a5fe859 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/responses_store.db diff --git a/llama_stack/templates/tgi/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/tgi/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..49777092f --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/huggingface_datasetio.db diff --git a/llama_stack/templates/tgi/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/tgi/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..85adea112 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/localfs_datasetio.db diff --git a/llama_stack/templates/tgi/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/tgi/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..aec5aedda --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/meta_reference_eval.db diff --git a/llama_stack/templates/tgi/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/tgi/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/tgi/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/tgi/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/tgi/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/tgi/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..8abf9f5f3 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/trace_store.db diff --git a/llama_stack/templates/tgi/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/tgi/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/tgi/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/tgi/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/tgi/run-with-safety.yaml b/llama_stack/templates/tgi/run-with-safety.yaml index c4f9ae7ef..b35ee22b1 100644 --- a/llama_stack/templates/tgi/run-with-safety.yaml +++ b/llama_stack/templates/tgi/run-with-safety.yaml @@ -31,49 +31,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/tgi/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/responses_store.db + config: ~/.llama/distributions/tgi/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/trace_store.db + config: ~/.llama/distributions/tgi/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/meta_reference_eval.db + config: ~/.llama/distributions/tgi/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/huggingface_datasetio.db + config: ~/.llama/distributions/tgi/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/localfs_datasetio.db + config: ~/.llama/distributions/tgi/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -83,19 +60,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/tgi/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/tgi/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/tgi/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/tgi/run.yaml b/llama_stack/templates/tgi/run.yaml index 70e5872b3..a70ddb11f 100644 --- a/llama_stack/templates/tgi/run.yaml +++ b/llama_stack/templates/tgi/run.yaml @@ -30,49 +30,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/tgi/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/responses_store.db + config: ~/.llama/distributions/tgi/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/trace_store.db + config: ~/.llama/distributions/tgi/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/meta_reference_eval.db + config: ~/.llama/distributions/tgi/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/huggingface_datasetio.db + config: ~/.llama/distributions/tgi/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/localfs_datasetio.db + config: ~/.llama/distributions/tgi/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -82,19 +59,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/tgi/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/tgi/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/tgi/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/together/provider_configs/__init__.py b/llama_stack/templates/together/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/together/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/together/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..a7dcf434d --- /dev/null +++ b/llama_stack/templates/together/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/responses_store.db diff --git a/llama_stack/templates/together/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/together/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..1889e94b9 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/huggingface_datasetio.db diff --git a/llama_stack/templates/together/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/together/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..c02dff8b3 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/localfs_datasetio.db diff --git a/llama_stack/templates/together/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/together/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..a9aa1a380 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/meta_reference_eval.db diff --git a/llama_stack/templates/together/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/together/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/together/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/together/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/together/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/together/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/together/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/together/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..c98ec4dcb --- /dev/null +++ b/llama_stack/templates/together/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/trace_store.db diff --git a/llama_stack/templates/together/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/together/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/together/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/together/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/together/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/together/provider_configs/tool_runtime/wolfram-alpha.yaml b/llama_stack/templates/together/provider_configs/tool_runtime/wolfram-alpha.yaml new file mode 100644 index 000000000..a295808f5 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/tool_runtime/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} diff --git a/llama_stack/templates/together/run-with-safety.yaml b/llama_stack/templates/together/run-with-safety.yaml index 14f423855..53c35f839 100644 --- a/llama_stack/templates/together/run-with-safety.yaml +++ b/llama_stack/templates/together/run-with-safety.yaml @@ -41,44 +41,22 @@ providers: agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/responses_store.db + config: ~/.llama/distributions/together/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/trace_store.db + config: ~/.llama/distributions/together/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/meta_reference_eval.db + config: ~/.llama/distributions/together/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/huggingface_datasetio.db + config: ~/.llama/distributions/together/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/localfs_datasetio.db + config: ~/.llama/distributions/together/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -88,19 +66,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/together/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/together/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/together/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -109,8 +82,7 @@ providers: config: {} - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/together/provider_configs/tool_runtime/wolfram-alpha.yaml metadata_store: type: sqlite db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/registry.db diff --git a/llama_stack/templates/together/run.yaml b/llama_stack/templates/together/run.yaml index 38f1922c0..4f4a75826 100644 --- a/llama_stack/templates/together/run.yaml +++ b/llama_stack/templates/together/run.yaml @@ -31,49 +31,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/together/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/responses_store.db + config: ~/.llama/distributions/together/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/trace_store.db + config: ~/.llama/distributions/together/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/meta_reference_eval.db + config: ~/.llama/distributions/together/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/huggingface_datasetio.db + config: ~/.llama/distributions/together/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/localfs_datasetio.db + config: ~/.llama/distributions/together/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -83,19 +60,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/together/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/together/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/together/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} @@ -104,8 +76,7 @@ providers: config: {} - provider_id: wolfram-alpha provider_type: remote::wolfram-alpha - config: - api_key: ${env.WOLFRAM_ALPHA_API_KEY:=} + config: ~/.llama/distributions/together/provider_configs/tool_runtime/wolfram-alpha.yaml metadata_store: type: sqlite db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/registry.db diff --git a/llama_stack/templates/vllm-gpu/provider_configs/__init__.py b/llama_stack/templates/vllm-gpu/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/vllm-gpu/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/vllm-gpu/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..19d2be3e5 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/responses_store.db diff --git a/llama_stack/templates/vllm-gpu/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/vllm-gpu/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..acb54dc41 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/huggingface_datasetio.db diff --git a/llama_stack/templates/vllm-gpu/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/vllm-gpu/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..9edad7c96 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/localfs_datasetio.db diff --git a/llama_stack/templates/vllm-gpu/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/vllm-gpu/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..a31b03abe --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/meta_reference_eval.db diff --git a/llama_stack/templates/vllm-gpu/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/vllm-gpu/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/vllm-gpu/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/vllm-gpu/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/vllm-gpu/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/vllm-gpu/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..cdab44c19 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/trace_store.db diff --git a/llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/vllm-gpu/run.yaml b/llama_stack/templates/vllm-gpu/run.yaml index 6854ad05c..e6ec0ec37 100644 --- a/llama_stack/templates/vllm-gpu/run.yaml +++ b/llama_stack/templates/vllm-gpu/run.yaml @@ -35,49 +35,26 @@ providers: safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/vllm-gpu/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/responses_store.db + config: ~/.llama/distributions/vllm-gpu/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/trace_store.db + config: ~/.llama/distributions/vllm-gpu/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/meta_reference_eval.db + config: ~/.llama/distributions/vllm-gpu/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/huggingface_datasetio.db + config: ~/.llama/distributions/vllm-gpu/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/localfs_datasetio.db + config: ~/.llama/distributions/vllm-gpu/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -87,19 +64,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/vllm-gpu/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/vllm-gpu/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/vllm-gpu/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {} diff --git a/llama_stack/templates/watsonx/provider_configs/__init__.py b/llama_stack/templates/watsonx/provider_configs/__init__.py new file mode 100644 index 000000000..756f351d8 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/__init__.py @@ -0,0 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. diff --git a/llama_stack/templates/watsonx/provider_configs/agents/meta-reference.yaml b/llama_stack/templates/watsonx/provider_configs/agents/meta-reference.yaml new file mode 100644 index 000000000..de1719bde --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/agents/meta-reference.yaml @@ -0,0 +1,7 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/agents_store.db +responses_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/responses_store.db diff --git a/llama_stack/templates/watsonx/provider_configs/datasetio/huggingface.yaml b/llama_stack/templates/watsonx/provider_configs/datasetio/huggingface.yaml new file mode 100644 index 000000000..d80bd28f2 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/datasetio/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/huggingface_datasetio.db diff --git a/llama_stack/templates/watsonx/provider_configs/datasetio/localfs.yaml b/llama_stack/templates/watsonx/provider_configs/datasetio/localfs.yaml new file mode 100644 index 000000000..d25f5b860 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/datasetio/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/localfs_datasetio.db diff --git a/llama_stack/templates/watsonx/provider_configs/eval/meta-reference.yaml b/llama_stack/templates/watsonx/provider_configs/eval/meta-reference.yaml new file mode 100644 index 000000000..66d9ae71e --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/eval/meta-reference.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/meta_reference_eval.db diff --git a/llama_stack/templates/watsonx/provider_configs/safety/llama-guard.yaml b/llama_stack/templates/watsonx/provider_configs/safety/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/safety/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/watsonx/provider_configs/scoring/braintrust.yaml b/llama_stack/templates/watsonx/provider_configs/scoring/braintrust.yaml new file mode 100644 index 000000000..96a305feb --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/scoring/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:=} diff --git a/llama_stack/templates/watsonx/provider_configs/telemetry/meta-reference.yaml b/llama_stack/templates/watsonx/provider_configs/telemetry/meta-reference.yaml new file mode 100644 index 000000000..396d26f3d --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/telemetry/meta-reference.yaml @@ -0,0 +1,3 @@ +service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" +sinks: ${env.TELEMETRY_SINKS:=console,sqlite} +sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/trace_store.db diff --git a/llama_stack/templates/watsonx/provider_configs/tool_runtime/brave-search.yaml b/llama_stack/templates/watsonx/provider_configs/tool_runtime/brave-search.yaml new file mode 100644 index 000000000..118abeee9 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/tool_runtime/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/watsonx/provider_configs/tool_runtime/tavily-search.yaml b/llama_stack/templates/watsonx/provider_configs/tool_runtime/tavily-search.yaml new file mode 100644 index 000000000..01bf9996c --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/tool_runtime/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:=} +max_results: 3 diff --git a/llama_stack/templates/watsonx/provider_configs/vector_io/faiss.yaml b/llama_stack/templates/watsonx/provider_configs/vector_io/faiss.yaml new file mode 100644 index 000000000..09537bf90 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/vector_io/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/faiss_store.db diff --git a/llama_stack/templates/watsonx/run.yaml b/llama_stack/templates/watsonx/run.yaml index 8b8fc09c4..2b2c47314 100644 --- a/llama_stack/templates/watsonx/run.yaml +++ b/llama_stack/templates/watsonx/run.yaml @@ -24,57 +24,30 @@ providers: vector_io: - provider_id: faiss provider_type: inline::faiss - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/faiss_store.db + config: ~/.llama/distributions/watsonx/provider_configs/vector_io/faiss.yaml safety: - provider_id: llama-guard provider_type: inline::llama-guard - config: - excluded_categories: [] + config: ~/.llama/distributions/watsonx/provider_configs/safety/llama-guard.yaml agents: - provider_id: meta-reference provider_type: inline::meta-reference - config: - persistence_store: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/agents_store.db - responses_store: - type: sqlite - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/responses_store.db + config: ~/.llama/distributions/watsonx/provider_configs/agents/meta-reference.yaml telemetry: - provider_id: meta-reference provider_type: inline::meta-reference - config: - service_name: "${env.OTEL_SERVICE_NAME:=\u200B}" - sinks: ${env.TELEMETRY_SINKS:=console,sqlite} - sqlite_db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/trace_store.db + config: ~/.llama/distributions/watsonx/provider_configs/telemetry/meta-reference.yaml eval: - provider_id: meta-reference provider_type: inline::meta-reference - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/meta_reference_eval.db + config: ~/.llama/distributions/watsonx/provider_configs/eval/meta-reference.yaml datasetio: - provider_id: huggingface provider_type: remote::huggingface - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/huggingface_datasetio.db + config: ~/.llama/distributions/watsonx/provider_configs/datasetio/huggingface.yaml - provider_id: localfs provider_type: inline::localfs - config: - kvstore: - type: sqlite - namespace: null - db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/watsonx}/localfs_datasetio.db + config: ~/.llama/distributions/watsonx/provider_configs/datasetio/localfs.yaml scoring: - provider_id: basic provider_type: inline::basic @@ -84,19 +57,14 @@ providers: config: {} - provider_id: braintrust provider_type: inline::braintrust - config: - openai_api_key: ${env.OPENAI_API_KEY:=} + config: ~/.llama/distributions/watsonx/provider_configs/scoring/braintrust.yaml tool_runtime: - provider_id: brave-search provider_type: remote::brave-search - config: - api_key: ${env.BRAVE_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/watsonx/provider_configs/tool_runtime/brave-search.yaml - provider_id: tavily-search provider_type: remote::tavily-search - config: - api_key: ${env.TAVILY_SEARCH_API_KEY:=} - max_results: 3 + config: ~/.llama/distributions/watsonx/provider_configs/tool_runtime/tavily-search.yaml - provider_id: rag-runtime provider_type: inline::rag-runtime config: {}