Skip to content

Commit dd1f946

Browse files
authored
feat: include a default inference store during llama stack build (#3373)
# What does this PR do? enables completions storage when using `llama stack build --providers` - - GET /v1/chat/completions - GET /v1/chat/completions/{id} todo: llama stack build and distro codegen should use the same code paths ## Test Plan ci
1 parent 9d3a234 commit dd1f946

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llama_stack/cli/stack/_build.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
from llama_stack.core.utils.exec import formulate_run_args, run_command
4646
from llama_stack.core.utils.image_types import LlamaStackImageType
4747
from llama_stack.providers.datatypes import Api
48+
from llama_stack.providers.utils.sqlstore.sqlstore import SqliteSqlStoreConfig
4849

4950
DISTRIBS_PATH = Path(__file__).parent.parent.parent / "distributions"
5051

@@ -294,6 +295,12 @@ def _generate_run_config(
294295
if build_config.external_providers_dir
295296
else EXTERNAL_PROVIDERS_DIR,
296297
)
298+
if not run_config.inference_store:
299+
run_config.inference_store = SqliteSqlStoreConfig(
300+
**SqliteSqlStoreConfig.sample_run_config(
301+
__distro_dir__=(DISTRIBS_BASE_DIR / image_name).as_posix(), db_name="inference_store.db"
302+
)
303+
)
297304
# build providers dict
298305
provider_registry = get_provider_registry(build_config)
299306
for api in apis:

0 commit comments

Comments
 (0)