mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-10 04:08:31 +00:00
config
This commit is contained in:
parent
a91771f034
commit
194d86a232
1 changed files with 4 additions and 1 deletions
|
@ -34,14 +34,16 @@ class ProviderImpl(Providers):
|
||||||
|
|
||||||
async def list_providers(self) -> ListProvidersResponse:
|
async def list_providers(self) -> ListProvidersResponse:
|
||||||
run_config = self.config.run_config
|
run_config = self.config.run_config
|
||||||
|
safe_config = StackRunConfig(**redact_sensitive_fields(run_config.model_dump()))
|
||||||
ret = []
|
ret = []
|
||||||
for api, providers in run_config.providers.items():
|
for api, providers in safe_config.providers.items():
|
||||||
ret.extend(
|
ret.extend(
|
||||||
[
|
[
|
||||||
ProviderInfo(
|
ProviderInfo(
|
||||||
api=api,
|
api=api,
|
||||||
provider_id=p.provider_id,
|
provider_id=p.provider_id,
|
||||||
provider_type=p.provider_type,
|
provider_type=p.provider_type,
|
||||||
|
config=p.config,
|
||||||
)
|
)
|
||||||
for p in providers
|
for p in providers
|
||||||
]
|
]
|
||||||
|
@ -59,6 +61,7 @@ class ProviderImpl(Providers):
|
||||||
api=api,
|
api=api,
|
||||||
provider_id=p.provider_id,
|
provider_id=p.provider_id,
|
||||||
provider_type=p.provider_type,
|
provider_type=p.provider_type,
|
||||||
|
config=p.config,
|
||||||
)
|
)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue