From eb37fba9da0232e359773cda7cabf666908d371a Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Mon, 16 Dec 2024 14:08:30 -0800 Subject: [PATCH] Small fix to library client --- docs/source/distributions/self_hosted_distro/ollama.md | 2 +- llama_stack/distribution/library_client.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/distributions/self_hosted_distro/ollama.md b/docs/source/distributions/self_hosted_distro/ollama.md index 3fe552a56..c915a7ac3 100644 --- a/docs/source/distributions/self_hosted_distro/ollama.md +++ b/docs/source/distributions/self_hosted_distro/ollama.md @@ -102,7 +102,7 @@ Make sure you have done `pip install llama-stack` and have the Llama Stack CLI a export LLAMA_STACK_PORT=5001 llama stack build --template ollama --image-type conda -llama stack run ./distributions/ollama/run.yaml \ +llama stack run ./run.yaml \ --port $LLAMA_STACK_PORT \ --env INFERENCE_MODEL=$INFERENCE_MODEL \ --env OLLAMA_URL=http://localhost:11434 diff --git a/llama_stack/distribution/library_client.py b/llama_stack/distribution/library_client.py index ee483f2bc..4ce3ec272 100644 --- a/llama_stack/distribution/library_client.py +++ b/llama_stack/distribution/library_client.py @@ -257,6 +257,8 @@ class AsyncLlamaStackAsLibraryClient(AsyncLlamaStackClient): endpoints = get_all_api_endpoints() endpoint_impls = {} for api, api_endpoints in endpoints.items(): + if api not in self.impls: + continue for endpoint in api_endpoints: impl = self.impls[api] func = getattr(impl, endpoint.name)