diff --git a/distributions/ramalama/faiss_store.db b/distributions/ramalama/faiss_store.db new file mode 100644 index 000000000..573e60e90 Binary files /dev/null and b/distributions/ramalama/faiss_store.db differ diff --git a/docs/_static/llama-stack-spec.html b/docs/_static/llama-stack-spec.html index 3e3ca723f..c3c18774e 100644 --- a/docs/_static/llama-stack-spec.html +++ b/docs/_static/llama-stack-spec.html @@ -2650,7 +2650,7 @@ } }, "tags": [ - "Inspect" + "Providers" ], "description": "", "parameters": [] diff --git a/docs/_static/llama-stack-spec.yaml b/docs/_static/llama-stack-spec.yaml index 6261e9987..1738788e4 100644 --- a/docs/_static/llama-stack-spec.yaml +++ b/docs/_static/llama-stack-spec.yaml @@ -1814,7 +1814,7 @@ paths: default: $ref: '#/components/responses/DefaultError' tags: - - Inspect + - Providers description: '' parameters: [] /v1/inspect/routes: diff --git a/llama_stack/apis/inspect/inspect.py b/llama_stack/apis/inspect/inspect.py index 25937bb61..3896d67a9 100644 --- a/llama_stack/apis/inspect/inspect.py +++ b/llama_stack/apis/inspect/inspect.py @@ -24,17 +24,6 @@ class HealthInfo(BaseModel): # TODO: add a provider level status -@json_schema_type -class ProviderInfo(BaseModel): - api: str - provider_id: str - provider_type: str - - -class ListProvidersResponse(BaseModel): - data: List[ProviderInfo] - - @json_schema_type class VersionInfo(BaseModel): version: str @@ -46,9 +35,6 @@ class ListRoutesResponse(BaseModel): @runtime_checkable class Inspect(Protocol): - @webmethod(route="/inspect/providers", method="GET") - async def list_providers(self) -> ListProvidersResponse: ... - @webmethod(route="/inspect/routes", method="GET") async def list_routes(self) -> ListRoutesResponse: ... diff --git a/llama_stack/distribution/inspect.py b/llama_stack/distribution/inspect.py index fddb62570..ba0ce5ea2 100644 --- a/llama_stack/distribution/inspect.py +++ b/llama_stack/distribution/inspect.py @@ -11,9 +11,7 @@ from pydantic import BaseModel from llama_stack.apis.inspect import ( HealthInfo, Inspect, - ListProvidersResponse, ListRoutesResponse, - ProviderInfo, RouteInfo, VersionInfo, ) @@ -39,24 +37,6 @@ class DistributionInspectImpl(Inspect): async def initialize(self) -> None: pass - async def list_providers(self) -> ListProvidersResponse: - run_config = self.config.run_config - - ret = [] - for api, providers in run_config.providers.items(): - ret.extend( - [ - ProviderInfo( - api=api, - provider_id=p.provider_id, - provider_type=p.provider_type, - ) - for p in providers - ] - ) - - return ListProvidersResponse(data=ret) - async def list_routes(self) -> ListRoutesResponse: run_config = self.config.run_config diff --git a/tests/integration/providers/test_providers.py b/tests/integration/providers/test_providers.py index 174d01b5c..748a831b9 100644 --- a/tests/integration/providers/test_providers.py +++ b/tests/integration/providers/test_providers.py @@ -15,3 +15,8 @@ class TestProviders: def test_list(self, llama_stack_client: LlamaStackAsLibraryClient | LlamaStackClient): provider_list = llama_stack_client.providers.list() assert provider_list is not None + + @pytest.mark.asyncio + def test_inspect(self, llama_stack_client: LlamaStackAsLibraryClient | LlamaStackClient): + provider_list = llama_stack_client.providers.retrieve("ollama") + assert provider_list is not None