mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-10 04:08:31 +00:00
fix
This commit is contained in:
parent
9347a646db
commit
2d1cebad88
1 changed files with 4 additions and 7 deletions
|
@ -4,14 +4,11 @@
|
||||||
# This source code is licensed under the terms described in the LICENSE file in
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
# the root directory of this source tree.
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from llama_stack.apis.providers import (
|
from llama_stack.apis.providers import ListProvidersResponse, ProviderInfo, Providers
|
||||||
GetProviderResponse,
|
|
||||||
ListProvidersResponse,
|
|
||||||
ProviderInfo,
|
|
||||||
Providers,
|
|
||||||
)
|
|
||||||
|
|
||||||
from .datatypes import StackRunConfig
|
from .datatypes import StackRunConfig
|
||||||
from .stack import redact_sensitive_fields
|
from .stack import redact_sensitive_fields
|
||||||
|
@ -52,7 +49,7 @@ class ProviderImpl(Providers):
|
||||||
|
|
||||||
return ListProvidersResponse(data=ret)
|
return ListProvidersResponse(data=ret)
|
||||||
|
|
||||||
async def inspect_provider(self, provider_id: str) -> GetProviderResponse:
|
async def inspect_provider(self, provider_id: str) -> Optional[ProviderInfo]:
|
||||||
run_config = self.config.run_config
|
run_config = self.config.run_config
|
||||||
safe_config = StackRunConfig(**redact_sensitive_fields(run_config.model_dump()))
|
safe_config = StackRunConfig(**redact_sensitive_fields(run_config.model_dump()))
|
||||||
for api, providers in safe_config.providers.items():
|
for api, providers in safe_config.providers.items():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue