diff --git a/llama_stack/cli/stack/_build.py b/llama_stack/cli/stack/_build.py index 7ade6f17a..7151b674a 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 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 e07da001e..2e2e31bde 100644 --- a/llama_stack/distribution/datatypes.py +++ b/llama_stack/distribution/datatypes.py @@ -148,7 +148,10 @@ in the runtime configuration to help route to the correct provider.""", class Provider(BaseModel): provider_id: str provider_type: str - config: dict[str, Any] + config: Path | 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..a2a0c855f 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, Path): + with open(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 f238e3bba..04518b951 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 @@ -48,12 +49,13 @@ class ProviderImpl(Providers): ret = [] for api, providers in safe_config.providers.items(): for p in providers: + 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 3726bb3a5..b25270507 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", @@ -325,8 +324,8 @@ 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_type = instantiate_class_type(provider_spec.config_class) + config = resolve_config(provider=provider, provider_spec=provider_spec) method = "get_adapter_impl" args = [config, deps] @@ -344,8 +343,8 @@ async def instantiate_provider( else: method = "get_provider_impl" - config_type = instantiate_class_type(provider_spec.config_class) - config = config_type(**provider.config) + # config_type = instantiate_class_type(provider_spec.config_class) + 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 c86880669..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,125 +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 not env_value: - # value_expr returns empty string (not None) when not matched - # This means ${env.FOO:=} is an error - if value_expr == "": - raise EnvVarError(env_var, path) - else: - value = value_expr - else: - value = env_value - elif operator == "+": # Conditional value syntax: ${env.FOO:+value_if_set} - if env_value: - value = value_expr - else: - # If env var is not set, return empty string for the conditional case - 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..f10eafb06 --- /dev/null +++ b/llama_stack/distribution/utils/env.py @@ -0,0 +1,127 @@ +# 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 ''}") + + +def replace_env_vars(config: Any, path: str = "") -> Any: + if isinstance(config, dict): + result_dict: dict[Any, Any] = {} + 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: list[Any] = [] + 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 not env_value: + # value_expr returns empty string (not None) when not matched + # This means ${env.FOO:=} is an error + if value_expr == "": + raise EnvVarError(env_var, path) + else: + value = value_expr + else: + value = env_value + elif operator == "+": # Conditional value syntax: ${env.FOO:+value_if_set} + if env_value: + value = value_expr + else: + # If env var is not set, return empty string for the conditional case + 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: str = 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 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 _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 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/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/braintrust.yaml b/llama_stack/templates/bedrock/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/bedrock/provider_configs/brave-search.yaml b/llama_stack/templates/bedrock/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/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/faiss.yaml b/llama_stack/templates/bedrock/provider_configs/faiss.yaml new file mode 100644 index 000000000..bfefbc853 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/bedrock}/faiss_store.db diff --git a/llama_stack/templates/bedrock/provider_configs/huggingface.yaml b/llama_stack/templates/bedrock/provider_configs/huggingface.yaml new file mode 100644 index 000000000..402f61855 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/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/localfs.yaml b/llama_stack/templates/bedrock/provider_configs/localfs.yaml new file mode 100644 index 000000000..2ef1a6551 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/bedrock/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..758854acb --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/bedrock/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..c81006620 --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/bedrock/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..942480ebe --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/bedrock/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/bedrock/provider_configs/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:+} +max_results: 3 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/braintrust.yaml b/llama_stack/templates/cerebras/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/cerebras/provider_configs/brave-search.yaml b/llama_stack/templates/cerebras/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/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/cerebras.yaml b/llama_stack/templates/cerebras/provider_configs/cerebras.yaml new file mode 100644 index 000000000..e16429a03 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/cerebras.yaml @@ -0,0 +1,2 @@ +base_url: https://api.cerebras.ai +api_key: ${env.CEREBRAS_API_KEY} diff --git a/llama_stack/templates/cerebras/provider_configs/faiss.yaml b/llama_stack/templates/cerebras/provider_configs/faiss.yaml new file mode 100644 index 000000000..e3015f61f --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/cerebras}/faiss_store.db diff --git a/llama_stack/templates/cerebras/provider_configs/huggingface.yaml b/llama_stack/templates/cerebras/provider_configs/huggingface.yaml new file mode 100644 index 000000000..e5ddcbf98 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/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/llama-guard.yaml b/llama_stack/templates/cerebras/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/cerebras/provider_configs/localfs.yaml b/llama_stack/templates/cerebras/provider_configs/localfs.yaml new file mode 100644 index 000000000..3bfb0770a --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/cerebras/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..8da139a08 --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/cerebras/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..c9e8c378f --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/cerebras/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..da1ed636b --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/cerebras/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/cerebras/provider_configs/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:+} +max_results: 3 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/braintrust.yaml b/llama_stack/templates/dell/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/dell/provider_configs/brave-search.yaml b/llama_stack/templates/dell/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/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/chromadb.yaml b/llama_stack/templates/dell/provider_configs/chromadb.yaml new file mode 100644 index 000000000..ee647931a --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/chromadb.yaml @@ -0,0 +1 @@ +url: ${env.CHROMA_URL} diff --git a/llama_stack/templates/dell/provider_configs/huggingface.yaml b/llama_stack/templates/dell/provider_configs/huggingface.yaml new file mode 100644 index 000000000..788546878 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/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/llama-guard.yaml b/llama_stack/templates/dell/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/dell/provider_configs/localfs.yaml b/llama_stack/templates/dell/provider_configs/localfs.yaml new file mode 100644 index 000000000..35b5d91d6 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/dell/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..c3d5681ea --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/dell/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..75764770b --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/dell/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..44eaa88d2 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/dell/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:+} +max_results: 3 diff --git a/llama_stack/templates/dell/provider_configs/tgi0.yaml b/llama_stack/templates/dell/provider_configs/tgi0.yaml new file mode 100644 index 000000000..64a53eea4 --- /dev/null +++ b/llama_stack/templates/dell/provider_configs/tgi0.yaml @@ -0,0 +1 @@ +url: ${env.DEH_URL} 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/provider_configs/braintrust.yaml b/llama_stack/templates/experimental-post-training/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/experimental-post-training/provider_configs/brave-search.yaml b/llama_stack/templates/experimental-post-training/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/brave-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.BRAVE_SEARCH_API_KEY:+} +max_results: 3 diff --git a/llama_stack/templates/experimental-post-training/provider_configs/faiss.yaml b/llama_stack/templates/experimental-post-training/provider_configs/faiss.yaml new file mode 100644 index 000000000..bd6020e8f --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/experimental-post-training}/faiss_store.db diff --git a/llama_stack/templates/experimental-post-training/provider_configs/huggingface-post-training.yaml b/llama_stack/templates/experimental-post-training/provider_configs/huggingface-post-training.yaml new file mode 100644 index 000000000..721913896 --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/huggingface-post-training.yaml @@ -0,0 +1,3 @@ +checkpoint_format: huggingface +distributed_backend: null +device: cpu diff --git a/llama_stack/templates/experimental-post-training/provider_configs/huggingface.yaml b/llama_stack/templates/experimental-post-training/provider_configs/huggingface.yaml new file mode 100644 index 000000000..8858afd78 --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/huggingface.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/huggingface}/huggingface_datasetio.db diff --git a/llama_stack/templates/experimental-post-training/provider_configs/localfs.yaml b/llama_stack/templates/experimental-post-training/provider_configs/localfs.yaml new file mode 100644 index 000000000..073d3ba08 --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/localfs.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/experimental-post-training}/localfs_datasetio.db diff --git a/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-agents.yaml b/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..7b794a633 --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-agents.yaml @@ -0,0 +1,4 @@ +persistence_store: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/experimental-post-training}/agents_store.db diff --git a/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-eval.yaml b/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..bad24e17d --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-eval.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/experimental-post-training/provider_configs/meta-reference-inference.yaml b/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-inference.yaml new file mode 100644 index 000000000..632a69c8b --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/meta-reference-inference.yaml @@ -0,0 +1,3 @@ +max_seq_len: 4096 +checkpoint_dir: null +create_distributed_process_group: False diff --git a/llama_stack/templates/experimental-post-training/provider_configs/ollama.yaml b/llama_stack/templates/experimental-post-training/provider_configs/ollama.yaml new file mode 100644 index 000000000..cc7046742 --- /dev/null +++ b/llama_stack/templates/experimental-post-training/provider_configs/ollama.yaml @@ -0,0 +1 @@ +url: ${env.OLLAMA_URL:=http://localhost:11434} diff --git a/llama_stack/templates/experimental-post-training/run.yaml b/llama_stack/templates/experimental-post-training/run.yaml index 393cba41d..d165cec55 100644 --- a/llama_stack/templates/experimental-post-training/run.yaml +++ b/llama_stack/templates/experimental-post-training/run.yaml @@ -17,88 +17,55 @@ 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: namespace: null type: sqlite - db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/experimental-post-training}/registry.db + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/experimental-post-training}/registry.db models: [] shields: [] vector_dbs: [] 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/basic.yaml b/llama_stack/templates/fireworks/provider_configs/basic.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/basic.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/fireworks/provider_configs/braintrust.yaml b/llama_stack/templates/fireworks/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/fireworks/provider_configs/brave-search.yaml b/llama_stack/templates/fireworks/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/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/code-scanner.yaml b/llama_stack/templates/fireworks/provider_configs/code-scanner.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/code-scanner.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/fireworks/provider_configs/faiss.yaml b/llama_stack/templates/fireworks/provider_configs/faiss.yaml new file mode 100644 index 000000000..a58b869af --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/faiss_store.db diff --git a/llama_stack/templates/fireworks/provider_configs/fireworks.yaml b/llama_stack/templates/fireworks/provider_configs/fireworks.yaml new file mode 100644 index 000000000..11281b69b --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/fireworks.yaml @@ -0,0 +1,2 @@ +url: https://api.fireworks.ai/inference/v1 +api_key: ${env.FIREWORKS_API_KEY} diff --git a/llama_stack/templates/fireworks/provider_configs/huggingface.yaml b/llama_stack/templates/fireworks/provider_configs/huggingface.yaml new file mode 100644 index 000000000..0216e32eb --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/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/llama-guard-vision.yaml b/llama_stack/templates/fireworks/provider_configs/llama-guard-vision.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/llama-guard-vision.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/fireworks/provider_configs/llama-guard.yaml b/llama_stack/templates/fireworks/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/fireworks/provider_configs/llm-as-judge.yaml b/llama_stack/templates/fireworks/provider_configs/llm-as-judge.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/llm-as-judge.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/fireworks/provider_configs/localfs.yaml b/llama_stack/templates/fireworks/provider_configs/localfs.yaml new file mode 100644 index 000000000..211bede41 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/fireworks/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..c65c3dcde --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/fireworks/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..d5117c8c5 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/meta-reference-eval.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/meta-reference-files.yaml b/llama_stack/templates/fireworks/provider_configs/meta-reference-files.yaml new file mode 100644 index 000000000..527c93363 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/meta-reference-files.yaml @@ -0,0 +1,4 @@ +storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/fireworks/files} +metadata_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/fireworks}/files_metadata.db diff --git a/llama_stack/templates/fireworks/provider_configs/meta-reference-telemetry.yaml b/llama_stack/templates/fireworks/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..a81e7a720 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/meta-reference-telemetry.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/model-context-protocol.yaml b/llama_stack/templates/fireworks/provider_configs/model-context-protocol.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/model-context-protocol.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/fireworks/provider_configs/rag-runtime.yaml b/llama_stack/templates/fireworks/provider_configs/rag-runtime.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/rag-runtime.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/fireworks/provider_configs/sentence-transformers.yaml b/llama_stack/templates/fireworks/provider_configs/sentence-transformers.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/sentence-transformers.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/fireworks/provider_configs/tavily-search.yaml b/llama_stack/templates/fireworks/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/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/wolfram-alpha.yaml b/llama_stack/templates/fireworks/provider_configs/wolfram-alpha.yaml new file mode 100644 index 000000000..832aab38e --- /dev/null +++ b/llama_stack/templates/fireworks/provider_configs/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:+} 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/braintrust.yaml b/llama_stack/templates/groq/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/groq/provider_configs/brave-search.yaml b/llama_stack/templates/groq/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/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/faiss.yaml b/llama_stack/templates/groq/provider_configs/faiss.yaml new file mode 100644 index 000000000..6c67fc2b0 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/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/provider_configs/groq.yaml b/llama_stack/templates/groq/provider_configs/groq.yaml new file mode 100644 index 000000000..40f9a0d85 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/groq.yaml @@ -0,0 +1,2 @@ +url: https://api.groq.com +api_key: ${env.GROQ_API_KEY} diff --git a/llama_stack/templates/groq/provider_configs/huggingface.yaml b/llama_stack/templates/groq/provider_configs/huggingface.yaml new file mode 100644 index 000000000..7d1f11e0d --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/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/llama-guard.yaml b/llama_stack/templates/groq/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/groq/provider_configs/localfs.yaml b/llama_stack/templates/groq/provider_configs/localfs.yaml new file mode 100644 index 000000000..7d4c3a062 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/groq/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..ac4887d2e --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/groq/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..b38cb314e --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/groq/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..719068e08 --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/groq/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/groq/provider_configs/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/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/braintrust.yaml b/llama_stack/templates/hf-endpoint/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/hf-endpoint/provider_configs/brave-search.yaml b/llama_stack/templates/hf-endpoint/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/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/faiss.yaml b/llama_stack/templates/hf-endpoint/provider_configs/faiss.yaml new file mode 100644 index 000000000..acf8140bf --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-endpoint}/faiss_store.db diff --git a/llama_stack/templates/hf-endpoint/provider_configs/hf-endpoint.yaml b/llama_stack/templates/hf-endpoint/provider_configs/hf-endpoint.yaml new file mode 100644 index 000000000..bec3616a7 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/hf-endpoint.yaml @@ -0,0 +1,2 @@ +endpoint_name: ${env.INFERENCE_ENDPOINT_NAME} +api_token: ${env.HF_API_TOKEN} diff --git a/llama_stack/templates/hf-endpoint/provider_configs/huggingface.yaml b/llama_stack/templates/hf-endpoint/provider_configs/huggingface.yaml new file mode 100644 index 000000000..ce0d8a8c5 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/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/llama-guard.yaml b/llama_stack/templates/hf-endpoint/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/hf-endpoint/provider_configs/localfs.yaml b/llama_stack/templates/hf-endpoint/provider_configs/localfs.yaml new file mode 100644 index 000000000..29b0f2460 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/hf-endpoint/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..be0bdc58d --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/hf-endpoint/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..99d93e306 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/hf-endpoint/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..bcdc0d998 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/hf-endpoint/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/hf-endpoint/provider_configs/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/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/braintrust.yaml b/llama_stack/templates/hf-serverless/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/hf-serverless/provider_configs/brave-search.yaml b/llama_stack/templates/hf-serverless/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/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/faiss.yaml b/llama_stack/templates/hf-serverless/provider_configs/faiss.yaml new file mode 100644 index 000000000..601b71735 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/hf-serverless}/faiss_store.db diff --git a/llama_stack/templates/hf-serverless/provider_configs/hf-serverless.yaml b/llama_stack/templates/hf-serverless/provider_configs/hf-serverless.yaml new file mode 100644 index 000000000..1c2ca24bb --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/hf-serverless.yaml @@ -0,0 +1,2 @@ +huggingface_repo: ${env.INFERENCE_MODEL} +api_token: ${env.HF_API_TOKEN} diff --git a/llama_stack/templates/hf-serverless/provider_configs/huggingface.yaml b/llama_stack/templates/hf-serverless/provider_configs/huggingface.yaml new file mode 100644 index 000000000..c44c6efdf --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/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/llama-guard.yaml b/llama_stack/templates/hf-serverless/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/hf-serverless/provider_configs/localfs.yaml b/llama_stack/templates/hf-serverless/provider_configs/localfs.yaml new file mode 100644 index 000000000..b871028ce --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/hf-serverless/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..cd9610cba --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/hf-serverless/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..1fa1f67c8 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/hf-serverless/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..af9659004 --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/hf-serverless/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/hf-serverless/provider_configs/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/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/braintrust.yaml b/llama_stack/templates/llama_api/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/llama_api/provider_configs/brave-search.yaml b/llama_stack/templates/llama_api/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/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/chromadb.yaml b/llama_stack/templates/llama_api/provider_configs/chromadb.yaml new file mode 100644 index 000000000..dfe6771b8 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/chromadb.yaml @@ -0,0 +1 @@ +url: ${env.CHROMADB_URL:+} diff --git a/llama_stack/templates/llama_api/provider_configs/huggingface.yaml b/llama_stack/templates/llama_api/provider_configs/huggingface.yaml new file mode 100644 index 000000000..114aa1eca --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/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/llama-guard.yaml b/llama_stack/templates/llama_api/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/llama_api/provider_configs/llama-openai-compat.yaml b/llama_stack/templates/llama_api/provider_configs/llama-openai-compat.yaml new file mode 100644 index 000000000..348471cda --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/llama-openai-compat.yaml @@ -0,0 +1,2 @@ +openai_compat_api_base: https://api.llama.com/compat/v1/ +api_key: ${env.LLAMA_API_KEY:+} diff --git a/llama_stack/templates/llama_api/provider_configs/localfs.yaml b/llama_stack/templates/llama_api/provider_configs/localfs.yaml new file mode 100644 index 000000000..00f729f4e --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/llama_api/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..c790d9378 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/llama_api/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..6b54b7284 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/llama_api/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..2874a7038 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/meta-reference-telemetry.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/pgvector.yaml b/llama_stack/templates/llama_api/provider_configs/pgvector.yaml new file mode 100644 index 000000000..f48f15b78 --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/pgvector.yaml @@ -0,0 +1,5 @@ +host: ${env.PGVECTOR_HOST:=localhost} +port: ${env.PGVECTOR_PORT:=5432} +db: ${env.PGVECTOR_DB:+} +user: ${env.PGVECTOR_USER:+} +password: ${env.PGVECTOR_PASSWORD:+} diff --git a/llama_stack/templates/llama_api/provider_configs/sqlite-vec.yaml b/llama_stack/templates/llama_api/provider_configs/sqlite-vec.yaml new file mode 100644 index 000000000..02169b1dd --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/sqlite-vec.yaml @@ -0,0 +1 @@ +db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/llama_api}/sqlite_vec.db diff --git a/llama_stack/templates/llama_api/provider_configs/tavily-search.yaml b/llama_stack/templates/llama_api/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/llama_api/provider_configs/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/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/braintrust.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/brave-search.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/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/faiss.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/faiss.yaml new file mode 100644 index 000000000..584497ce2 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/meta-reference-gpu}/faiss_store.db diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/huggingface.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/huggingface.yaml new file mode 100644 index 000000000..3287bf2a7 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/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/llama-guard.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/localfs.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/localfs.yaml new file mode 100644 index 000000000..701db0eb3 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..8e2ce6e50 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..bad24e17d --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-eval.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/meta-reference-inference.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-inference.yaml new file mode 100644 index 000000000..74c8d8a52 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-inference.yaml @@ -0,0 +1,7 @@ +model: ${env.INFERENCE_MODEL} +checkpoint_dir: ${env.INFERENCE_CHECKPOINT_DIR:=null} +quantization: + type: ${env.QUANTIZATION_TYPE:=bf16} +model_parallel_size: ${env.MODEL_PARALLEL_SIZE:=0} +max_batch_size: ${env.MAX_BATCH_SIZE:=1} +max_seq_len: ${env.MAX_SEQ_LEN:=4096} diff --git a/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-telemetry.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..57095ab2d --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/meta-reference-gpu/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/provider_configs/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:+} +max_results: 3 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/basic.yaml b/llama_stack/templates/nvidia/provider_configs/basic.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/basic.yaml @@ -0,0 +1 @@ +{} diff --git a/llama_stack/templates/nvidia/provider_configs/faiss.yaml b/llama_stack/templates/nvidia/provider_configs/faiss.yaml new file mode 100644 index 000000000..b86ac6d54 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/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/provider_configs/localfs.yaml b/llama_stack/templates/nvidia/provider_configs/localfs.yaml new file mode 100644 index 000000000..7aec4dacf --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/nvidia/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..203edeced --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/meta-reference-agents.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/meta-reference-telemetry.yaml b/llama_stack/templates/nvidia/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..f7fcf1b91 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/meta-reference-telemetry.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/nvidia-datasetio.yaml b/llama_stack/templates/nvidia/provider_configs/nvidia-datasetio.yaml new file mode 100644 index 000000000..10188f080 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/nvidia-datasetio.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/nvidia-eval.yaml b/llama_stack/templates/nvidia/provider_configs/nvidia-eval.yaml new file mode 100644 index 000000000..54487f32b --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/nvidia-eval.yaml @@ -0,0 +1 @@ +evaluator_url: ${env.NVIDIA_EVALUATOR_URL:=http://localhost:7331} diff --git a/llama_stack/templates/nvidia/provider_configs/nvidia-inference.yaml b/llama_stack/templates/nvidia/provider_configs/nvidia-inference.yaml new file mode 100644 index 000000000..8056aff38 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/nvidia-inference.yaml @@ -0,0 +1,3 @@ +url: ${env.NVIDIA_BASE_URL:=https://integrate.api.nvidia.com} +api_key: ${env.NVIDIA_API_KEY:+} +append_api_version: ${env.NVIDIA_APPEND_API_VERSION:=True} diff --git a/llama_stack/templates/nvidia/provider_configs/nvidia-post-training.yaml b/llama_stack/templates/nvidia/provider_configs/nvidia-post-training.yaml new file mode 100644 index 000000000..1937109b4 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/nvidia-post-training.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/nvidia-safety.yaml b/llama_stack/templates/nvidia/provider_configs/nvidia-safety.yaml new file mode 100644 index 000000000..13453ee29 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/nvidia-safety.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/rag-runtime.yaml b/llama_stack/templates/nvidia/provider_configs/rag-runtime.yaml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/llama_stack/templates/nvidia/provider_configs/rag-runtime.yaml @@ -0,0 +1 @@ +{} 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/braintrust.yaml b/llama_stack/templates/ollama/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/ollama/provider_configs/brave-search.yaml b/llama_stack/templates/ollama/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/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/faiss.yaml b/llama_stack/templates/ollama/provider_configs/faiss.yaml new file mode 100644 index 000000000..4b5083bda --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/faiss_store.db diff --git a/llama_stack/templates/ollama/provider_configs/huggingface-post-training.yaml b/llama_stack/templates/ollama/provider_configs/huggingface-post-training.yaml new file mode 100644 index 000000000..721913896 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/huggingface-post-training.yaml @@ -0,0 +1,3 @@ +checkpoint_format: huggingface +distributed_backend: null +device: cpu diff --git a/llama_stack/templates/ollama/provider_configs/huggingface.yaml b/llama_stack/templates/ollama/provider_configs/huggingface.yaml new file mode 100644 index 000000000..95667fb9c --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/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/llama-guard.yaml b/llama_stack/templates/ollama/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/ollama/provider_configs/localfs.yaml b/llama_stack/templates/ollama/provider_configs/localfs.yaml new file mode 100644 index 000000000..1a38d1d6d --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/ollama/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..0679eda58 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/ollama/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..f15c27f1f --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/meta-reference-eval.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/meta-reference-files.yaml b/llama_stack/templates/ollama/provider_configs/meta-reference-files.yaml new file mode 100644 index 000000000..131a3da98 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/meta-reference-files.yaml @@ -0,0 +1,4 @@ +storage_dir: ${env.FILES_STORAGE_DIR:=~/.llama/distributions/ollama/files} +metadata_store: + type: sqlite + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/ollama}/files_metadata.db diff --git a/llama_stack/templates/ollama/provider_configs/meta-reference-telemetry.yaml b/llama_stack/templates/ollama/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..cd07ae79a --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/meta-reference-telemetry.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/ollama.yaml b/llama_stack/templates/ollama/provider_configs/ollama.yaml new file mode 100644 index 000000000..cc7046742 --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/ollama.yaml @@ -0,0 +1 @@ +url: ${env.OLLAMA_URL:=http://localhost:11434} diff --git a/llama_stack/templates/ollama/provider_configs/tavily-search.yaml b/llama_stack/templates/ollama/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/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/wolfram-alpha.yaml b/llama_stack/templates/ollama/provider_configs/wolfram-alpha.yaml new file mode 100644 index 000000000..832aab38e --- /dev/null +++ b/llama_stack/templates/ollama/provider_configs/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:+} 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/anthropic.yaml b/llama_stack/templates/open-benchmark/provider_configs/anthropic.yaml new file mode 100644 index 000000000..d5ce2b651 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/anthropic.yaml @@ -0,0 +1 @@ +api_key: ${env.ANTHROPIC_API_KEY:+} diff --git a/llama_stack/templates/open-benchmark/provider_configs/braintrust.yaml b/llama_stack/templates/open-benchmark/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/open-benchmark/provider_configs/brave-search.yaml b/llama_stack/templates/open-benchmark/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/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/chromadb.yaml b/llama_stack/templates/open-benchmark/provider_configs/chromadb.yaml new file mode 100644 index 000000000..dfe6771b8 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/chromadb.yaml @@ -0,0 +1 @@ +url: ${env.CHROMADB_URL:+} diff --git a/llama_stack/templates/open-benchmark/provider_configs/gemini.yaml b/llama_stack/templates/open-benchmark/provider_configs/gemini.yaml new file mode 100644 index 000000000..11ff9f04c --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/gemini.yaml @@ -0,0 +1 @@ +api_key: ${env.GEMINI_API_KEY:+} diff --git a/llama_stack/templates/open-benchmark/provider_configs/groq.yaml b/llama_stack/templates/open-benchmark/provider_configs/groq.yaml new file mode 100644 index 000000000..dc4c629e8 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/groq.yaml @@ -0,0 +1,2 @@ +url: https://api.groq.com +api_key: ${env.GROQ_API_KEY:+} diff --git a/llama_stack/templates/open-benchmark/provider_configs/huggingface.yaml b/llama_stack/templates/open-benchmark/provider_configs/huggingface.yaml new file mode 100644 index 000000000..51d561c31 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/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/llama-guard.yaml b/llama_stack/templates/open-benchmark/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/open-benchmark/provider_configs/localfs.yaml b/llama_stack/templates/open-benchmark/provider_configs/localfs.yaml new file mode 100644 index 000000000..48a2d6855 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/open-benchmark/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..2a485e81e --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/open-benchmark/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..518d5f39e --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/open-benchmark/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..b6c90adeb --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/meta-reference-telemetry.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/openai.yaml b/llama_stack/templates/open-benchmark/provider_configs/openai.yaml new file mode 100644 index 000000000..c3fcf9b82 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/openai.yaml @@ -0,0 +1 @@ +api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/open-benchmark/provider_configs/pgvector.yaml b/llama_stack/templates/open-benchmark/provider_configs/pgvector.yaml new file mode 100644 index 000000000..f48f15b78 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/pgvector.yaml @@ -0,0 +1,5 @@ +host: ${env.PGVECTOR_HOST:=localhost} +port: ${env.PGVECTOR_PORT:=5432} +db: ${env.PGVECTOR_DB:+} +user: ${env.PGVECTOR_USER:+} +password: ${env.PGVECTOR_PASSWORD:+} diff --git a/llama_stack/templates/open-benchmark/provider_configs/sqlite-vec.yaml b/llama_stack/templates/open-benchmark/provider_configs/sqlite-vec.yaml new file mode 100644 index 000000000..d0e6b2d5f --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/sqlite-vec.yaml @@ -0,0 +1 @@ +db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/open-benchmark}/sqlite_vec.db diff --git a/llama_stack/templates/open-benchmark/provider_configs/tavily-search.yaml b/llama_stack/templates/open-benchmark/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/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/provider_configs/together.yaml b/llama_stack/templates/open-benchmark/provider_configs/together.yaml new file mode 100644 index 000000000..dca6f3bb5 --- /dev/null +++ b/llama_stack/templates/open-benchmark/provider_configs/together.yaml @@ -0,0 +1,2 @@ +url: https://api.together.xyz/v1 +api_key: ${env.TOGETHER_API_KEY:+} 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/braintrust.yaml b/llama_stack/templates/passthrough/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/passthrough/provider_configs/brave-search.yaml b/llama_stack/templates/passthrough/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/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/faiss.yaml b/llama_stack/templates/passthrough/provider_configs/faiss.yaml new file mode 100644 index 000000000..b606d57ee --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/passthrough}/faiss_store.db diff --git a/llama_stack/templates/passthrough/provider_configs/huggingface.yaml b/llama_stack/templates/passthrough/provider_configs/huggingface.yaml new file mode 100644 index 000000000..1420b3112 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/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/llama-guard.yaml b/llama_stack/templates/passthrough/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/passthrough/provider_configs/localfs.yaml b/llama_stack/templates/passthrough/provider_configs/localfs.yaml new file mode 100644 index 000000000..7b1e9d3dd --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/passthrough/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..0f6400caf --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/passthrough/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..eeabc8187 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/passthrough/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..00c5dcc38 --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/meta-reference-telemetry.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/passthrough.yaml b/llama_stack/templates/passthrough/provider_configs/passthrough.yaml new file mode 100644 index 000000000..12b6b17dd --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/passthrough.yaml @@ -0,0 +1,2 @@ +url: ${env.PASSTHROUGH_URL} +api_key: ${env.PASSTHROUGH_API_KEY} diff --git a/llama_stack/templates/passthrough/provider_configs/tavily-search.yaml b/llama_stack/templates/passthrough/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/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/wolfram-alpha.yaml b/llama_stack/templates/passthrough/provider_configs/wolfram-alpha.yaml new file mode 100644 index 000000000..832aab38e --- /dev/null +++ b/llama_stack/templates/passthrough/provider_configs/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:+} 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/brave-search.yaml b/llama_stack/templates/postgres-demo/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/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/chromadb.yaml b/llama_stack/templates/postgres-demo/provider_configs/chromadb.yaml new file mode 100644 index 000000000..dfe6771b8 --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/chromadb.yaml @@ -0,0 +1 @@ +url: ${env.CHROMADB_URL:+} diff --git a/llama_stack/templates/postgres-demo/provider_configs/llama-guard.yaml b/llama_stack/templates/postgres-demo/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/postgres-demo/provider_configs/meta-reference-agents.yaml b/llama_stack/templates/postgres-demo/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..f7bc7ae67 --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/meta-reference-agents.yaml @@ -0,0 +1,14 @@ +persistence_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} +responses_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} diff --git a/llama_stack/templates/postgres-demo/provider_configs/meta-reference-telemetry.yaml b/llama_stack/templates/postgres-demo/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..99b1ccde7 --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/meta-reference-telemetry.yaml @@ -0,0 +1,3 @@ +service_name: ${env.OTEL_SERVICE_NAME:+} +sinks: ${env.TELEMETRY_SINKS:=console,otel_trace} +otel_trace_endpoint: ${env.OTEL_TRACE_ENDPOINT:=http://localhost:4318/v1/traces} diff --git a/llama_stack/templates/postgres-demo/provider_configs/tavily-search.yaml b/llama_stack/templates/postgres-demo/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/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/provider_configs/vllm-inference.yaml b/llama_stack/templates/postgres-demo/provider_configs/vllm-inference.yaml new file mode 100644 index 000000000..1c31124a1 --- /dev/null +++ b/llama_stack/templates/postgres-demo/provider_configs/vllm-inference.yaml @@ -0,0 +1,4 @@ +url: ${env.VLLM_URL:=http://localhost:8000/v1} +max_tokens: ${env.VLLM_MAX_TOKENS:=4096} +api_token: ${env.VLLM_API_TOKEN:=fake} +tls_verify: ${env.VLLM_TLS_VERIFY:=true} diff --git a/llama_stack/templates/postgres-demo/run.yaml b/llama_stack/templates/postgres-demo/run.yaml index 03b7a59fb..a8889e034 100644 --- a/llama_stack/templates/postgres-demo/run.yaml +++ b/llama_stack/templates/postgres-demo/run.yaml @@ -33,20 +33,14 @@ providers: - provider_id: meta-reference provider_type: inline::meta-reference config: - persistence_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} - responses_store: + persistence_store: &id001 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} + responses_store: *id001 telemetry: - provider_id: meta-reference provider_type: inline::meta-reference 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/braintrust.yaml b/llama_stack/templates/remote-vllm/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/remote-vllm/provider_configs/brave-search.yaml b/llama_stack/templates/remote-vllm/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/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/faiss.yaml b/llama_stack/templates/remote-vllm/provider_configs/faiss.yaml new file mode 100644 index 000000000..085d10323 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/remote-vllm}/faiss_store.db diff --git a/llama_stack/templates/remote-vllm/provider_configs/huggingface.yaml b/llama_stack/templates/remote-vllm/provider_configs/huggingface.yaml new file mode 100644 index 000000000..ba0ca92da --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/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/llama-guard.yaml b/llama_stack/templates/remote-vllm/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/remote-vllm/provider_configs/localfs.yaml b/llama_stack/templates/remote-vllm/provider_configs/localfs.yaml new file mode 100644 index 000000000..db2f3519c --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/remote-vllm/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..794bbf532 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/remote-vllm/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..122f37ce5 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/remote-vllm/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..1452238df --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/remote-vllm/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/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/vllm-inference.yaml b/llama_stack/templates/remote-vllm/provider_configs/vllm-inference.yaml new file mode 100644 index 000000000..1c31124a1 --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/vllm-inference.yaml @@ -0,0 +1,4 @@ +url: ${env.VLLM_URL:=http://localhost:8000/v1} +max_tokens: ${env.VLLM_MAX_TOKENS:=4096} +api_token: ${env.VLLM_API_TOKEN:=fake} +tls_verify: ${env.VLLM_TLS_VERIFY:=true} diff --git a/llama_stack/templates/remote-vllm/provider_configs/vllm-safety.yaml b/llama_stack/templates/remote-vllm/provider_configs/vllm-safety.yaml new file mode 100644 index 000000000..66d10f45f --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/vllm-safety.yaml @@ -0,0 +1,4 @@ +url: ${env.SAFETY_VLLM_URL} +max_tokens: ${env.VLLM_MAX_TOKENS:=4096} +api_token: ${env.VLLM_API_TOKEN:=fake} +tls_verify: ${env.VLLM_TLS_VERIFY:=true} diff --git a/llama_stack/templates/remote-vllm/provider_configs/wolfram-alpha.yaml b/llama_stack/templates/remote-vllm/provider_configs/wolfram-alpha.yaml new file mode 100644 index 000000000..832aab38e --- /dev/null +++ b/llama_stack/templates/remote-vllm/provider_configs/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:+} 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/brave-search.yaml b/llama_stack/templates/sambanova/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/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/chromadb.yaml b/llama_stack/templates/sambanova/provider_configs/chromadb.yaml new file mode 100644 index 000000000..dfe6771b8 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/chromadb.yaml @@ -0,0 +1 @@ +url: ${env.CHROMADB_URL:+} diff --git a/llama_stack/templates/sambanova/provider_configs/faiss.yaml b/llama_stack/templates/sambanova/provider_configs/faiss.yaml new file mode 100644 index 000000000..0bfd63800 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/sambanova}/faiss_store.db diff --git a/llama_stack/templates/sambanova/provider_configs/meta-reference-agents.yaml b/llama_stack/templates/sambanova/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..b929a59ba --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/meta-reference-agents.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/meta-reference-telemetry.yaml b/llama_stack/templates/sambanova/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..8b8921dc0 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/meta-reference-telemetry.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/pgvector.yaml b/llama_stack/templates/sambanova/provider_configs/pgvector.yaml new file mode 100644 index 000000000..f48f15b78 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/pgvector.yaml @@ -0,0 +1,5 @@ +host: ${env.PGVECTOR_HOST:=localhost} +port: ${env.PGVECTOR_PORT:=5432} +db: ${env.PGVECTOR_DB:+} +user: ${env.PGVECTOR_USER:+} +password: ${env.PGVECTOR_PASSWORD:+} diff --git a/llama_stack/templates/sambanova/provider_configs/sambanova.yaml b/llama_stack/templates/sambanova/provider_configs/sambanova.yaml new file mode 100644 index 000000000..8d6b35315 --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/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/tavily-search.yaml b/llama_stack/templates/sambanova/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/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/wolfram-alpha.yaml b/llama_stack/templates/sambanova/provider_configs/wolfram-alpha.yaml new file mode 100644 index 000000000..832aab38e --- /dev/null +++ b/llama_stack/templates/sambanova/provider_configs/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:+} 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/run.yaml b/llama_stack/templates/starter/run.yaml index f7c53170b..00faf029e 100644 --- a/llama_stack/templates/starter/run.yaml +++ b/llama_stack/templates/starter/run.yaml @@ -68,7 +68,7 @@ providers: type: sqlite namespace: null db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/faiss_store.db - - provider_id: ${env.ENABLE_SQLITE_VEC+sqlite-vec} + - provider_id: ${env.ENABLE_SQLITE_VEC:+sqlite-vec} provider_type: inline::sqlite-vec config: db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/starter}/sqlite_vec.db diff --git a/llama_stack/templates/starter/starter.py b/llama_stack/templates/starter/starter.py index df31fed84..c9a1aa9d7 100644 --- a/llama_stack/templates/starter/starter.py +++ b/llama_stack/templates/starter/starter.py @@ -175,7 +175,7 @@ def get_distribution_template() -> DistributionTemplate: config=FaissVectorIOConfig.sample_run_config(f"~/.llama/distributions/{name}"), ), Provider( - provider_id="${env.ENABLE_SQLITE_VEC+sqlite-vec}", + provider_id="${env.ENABLE_SQLITE_VEC:+sqlite-vec}", provider_type="inline::sqlite-vec", config=SQLiteVectorIOConfig.sample_run_config(f"~/.llama/distributions/{name}"), ), @@ -226,7 +226,8 @@ def get_distribution_template() -> DistributionTemplate: default_models = get_model_registry(available_models) - postgres_store = PostgresSqlStoreConfig.sample_run_config() + postgres_store_config = PostgresSqlStoreConfig.sample_run_config() + postgres_store = PostgresSqlStoreConfig(**postgres_store_config) return DistributionTemplate( name=name, distro_type="self_hosted", 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/braintrust.yaml b/llama_stack/templates/tgi/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/tgi/provider_configs/brave-search.yaml b/llama_stack/templates/tgi/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/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/faiss.yaml b/llama_stack/templates/tgi/provider_configs/faiss.yaml new file mode 100644 index 000000000..254da1600 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/tgi}/faiss_store.db diff --git a/llama_stack/templates/tgi/provider_configs/huggingface.yaml b/llama_stack/templates/tgi/provider_configs/huggingface.yaml new file mode 100644 index 000000000..49777092f --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/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/llama-guard.yaml b/llama_stack/templates/tgi/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/tgi/provider_configs/localfs.yaml b/llama_stack/templates/tgi/provider_configs/localfs.yaml new file mode 100644 index 000000000..85adea112 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/tgi/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..c5a5fe859 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/tgi/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..aec5aedda --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/tgi/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..8abf9f5f3 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/tgi/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/tavily-search.yaml @@ -0,0 +1,2 @@ +api_key: ${env.TAVILY_SEARCH_API_KEY:+} +max_results: 3 diff --git a/llama_stack/templates/tgi/provider_configs/tgi-inference.yaml b/llama_stack/templates/tgi/provider_configs/tgi-inference.yaml new file mode 100644 index 000000000..c479db928 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/tgi-inference.yaml @@ -0,0 +1 @@ +url: ${env.TGI_URL} diff --git a/llama_stack/templates/tgi/provider_configs/tgi-safety.yaml b/llama_stack/templates/tgi/provider_configs/tgi-safety.yaml new file mode 100644 index 000000000..b1e228a65 --- /dev/null +++ b/llama_stack/templates/tgi/provider_configs/tgi-safety.yaml @@ -0,0 +1 @@ +url: ${env.TGI_SAFETY_URL} 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/braintrust.yaml b/llama_stack/templates/together/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/together/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/together/provider_configs/brave-search.yaml b/llama_stack/templates/together/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/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/faiss.yaml b/llama_stack/templates/together/provider_configs/faiss.yaml new file mode 100644 index 000000000..26c8a6c5f --- /dev/null +++ b/llama_stack/templates/together/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/together}/faiss_store.db diff --git a/llama_stack/templates/together/provider_configs/huggingface.yaml b/llama_stack/templates/together/provider_configs/huggingface.yaml new file mode 100644 index 000000000..1889e94b9 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/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/llama-guard.yaml b/llama_stack/templates/together/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/together/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/together/provider_configs/localfs.yaml b/llama_stack/templates/together/provider_configs/localfs.yaml new file mode 100644 index 000000000..c02dff8b3 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/together/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..a7dcf434d --- /dev/null +++ b/llama_stack/templates/together/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/together/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..a9aa1a380 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/together/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..c98ec4dcb --- /dev/null +++ b/llama_stack/templates/together/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/together/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/together/provider_configs/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/together.yaml b/llama_stack/templates/together/provider_configs/together.yaml new file mode 100644 index 000000000..dca6f3bb5 --- /dev/null +++ b/llama_stack/templates/together/provider_configs/together.yaml @@ -0,0 +1,2 @@ +url: https://api.together.xyz/v1 +api_key: ${env.TOGETHER_API_KEY:+} diff --git a/llama_stack/templates/together/provider_configs/wolfram-alpha.yaml b/llama_stack/templates/together/provider_configs/wolfram-alpha.yaml new file mode 100644 index 000000000..832aab38e --- /dev/null +++ b/llama_stack/templates/together/provider_configs/wolfram-alpha.yaml @@ -0,0 +1 @@ +api_key: ${env.WOLFRAM_ALPHA_API_KEY:+} 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/braintrust.yaml b/llama_stack/templates/vllm-gpu/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/vllm-gpu/provider_configs/brave-search.yaml b/llama_stack/templates/vllm-gpu/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/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/faiss.yaml b/llama_stack/templates/vllm-gpu/provider_configs/faiss.yaml new file mode 100644 index 000000000..97b373a89 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/faiss.yaml @@ -0,0 +1,4 @@ +kvstore: + type: sqlite + namespace: null + db_path: ${env.SQLITE_STORE_DIR:=~/.llama/distributions/vllm-gpu}/faiss_store.db diff --git a/llama_stack/templates/vllm-gpu/provider_configs/huggingface.yaml b/llama_stack/templates/vllm-gpu/provider_configs/huggingface.yaml new file mode 100644 index 000000000..acb54dc41 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/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/llama-guard.yaml b/llama_stack/templates/vllm-gpu/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/vllm-gpu/provider_configs/localfs.yaml b/llama_stack/templates/vllm-gpu/provider_configs/localfs.yaml new file mode 100644 index 000000000..9edad7c96 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/vllm-gpu/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..19d2be3e5 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/vllm-gpu/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..a31b03abe --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/vllm-gpu/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..cdab44c19 --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/vllm-gpu/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/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/provider_configs/vllm.yaml b/llama_stack/templates/vllm-gpu/provider_configs/vllm.yaml new file mode 100644 index 000000000..1a3d08e0e --- /dev/null +++ b/llama_stack/templates/vllm-gpu/provider_configs/vllm.yaml @@ -0,0 +1,6 @@ +tensor_parallel_size: ${env.TENSOR_PARALLEL_SIZE:=1} +max_tokens: ${env.MAX_TOKENS:=4096} +max_model_len: ${env.MAX_MODEL_LEN:=4096} +max_num_seqs: ${env.MAX_NUM_SEQS:=4} +enforce_eager: ${env.ENFORCE_EAGER:=False} +gpu_memory_utilization: ${env.GPU_MEMORY_UTILIZATION:=0.3} 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/braintrust.yaml b/llama_stack/templates/watsonx/provider_configs/braintrust.yaml new file mode 100644 index 000000000..354c33adb --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/braintrust.yaml @@ -0,0 +1 @@ +openai_api_key: ${env.OPENAI_API_KEY:+} diff --git a/llama_stack/templates/watsonx/provider_configs/brave-search.yaml b/llama_stack/templates/watsonx/provider_configs/brave-search.yaml new file mode 100644 index 000000000..318ad34b2 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/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/faiss.yaml b/llama_stack/templates/watsonx/provider_configs/faiss.yaml new file mode 100644 index 000000000..09537bf90 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/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/provider_configs/huggingface.yaml b/llama_stack/templates/watsonx/provider_configs/huggingface.yaml new file mode 100644 index 000000000..d80bd28f2 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/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/llama-guard.yaml b/llama_stack/templates/watsonx/provider_configs/llama-guard.yaml new file mode 100644 index 000000000..c492d412c --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/llama-guard.yaml @@ -0,0 +1 @@ +excluded_categories: [] diff --git a/llama_stack/templates/watsonx/provider_configs/localfs.yaml b/llama_stack/templates/watsonx/provider_configs/localfs.yaml new file mode 100644 index 000000000..d25f5b860 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/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/meta-reference-agents.yaml b/llama_stack/templates/watsonx/provider_configs/meta-reference-agents.yaml new file mode 100644 index 000000000..de1719bde --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/meta-reference-agents.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/meta-reference-eval.yaml b/llama_stack/templates/watsonx/provider_configs/meta-reference-eval.yaml new file mode 100644 index 000000000..66d9ae71e --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/meta-reference-eval.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/meta-reference-telemetry.yaml b/llama_stack/templates/watsonx/provider_configs/meta-reference-telemetry.yaml new file mode 100644 index 000000000..396d26f3d --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/meta-reference-telemetry.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/tavily-search.yaml b/llama_stack/templates/watsonx/provider_configs/tavily-search.yaml new file mode 100644 index 000000000..cd797fb9a --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/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/watsonx.yaml b/llama_stack/templates/watsonx/provider_configs/watsonx.yaml new file mode 100644 index 000000000..42c7d1d24 --- /dev/null +++ b/llama_stack/templates/watsonx/provider_configs/watsonx.yaml @@ -0,0 +1,3 @@ +url: ${env.WATSONX_BASE_URL:=https://us-south.ml.cloud.ibm.com} +api_key: ${env.WATSONX_API_KEY:+} +project_id: ${env.WATSONX_PROJECT_ID:+} diff --git a/tests/unit/server/test_replace_env_vars.py b/tests/unit/server/test_replace_env_vars.py index 0fb7c395e..474c5cbfa 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):