mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-30 11:50:14 +00:00
Small rename
This commit is contained in:
parent
71a905e93f
commit
95a96afe34
3 changed files with 5 additions and 5 deletions
|
@ -55,7 +55,7 @@ class ProviderWithSpec(Provider):
|
||||||
|
|
||||||
|
|
||||||
# TODO: this code is not very straightforward to follow and needs one more round of refactoring
|
# TODO: this code is not very straightforward to follow and needs one more round of refactoring
|
||||||
async def resolve_impls_with_routing(run_config: StackRunConfig) -> Dict[Api, Any]:
|
async def resolve_impls(run_config: StackRunConfig) -> Dict[Api, Any]:
|
||||||
"""
|
"""
|
||||||
Does two things:
|
Does two things:
|
||||||
- flatmaps, sorts and resolves the providers in dependency order
|
- flatmaps, sorts and resolves the providers in dependency order
|
||||||
|
|
|
@ -37,7 +37,7 @@ from llama_stack.providers.utils.telemetry.tracing import (
|
||||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
from llama_stack.distribution.datatypes import * # noqa: F403
|
||||||
|
|
||||||
from llama_stack.distribution.request_headers import set_request_provider_data
|
from llama_stack.distribution.request_headers import set_request_provider_data
|
||||||
from llama_stack.distribution.resolver import resolve_impls_with_routing
|
from llama_stack.distribution.resolver import resolve_impls
|
||||||
|
|
||||||
from .endpoints import get_all_api_endpoints
|
from .endpoints import get_all_api_endpoints
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ def main(
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
impls = asyncio.run(resolve_impls_with_routing(config))
|
impls = asyncio.run(resolve_impls(config))
|
||||||
if Api.telemetry in impls:
|
if Api.telemetry in impls:
|
||||||
setup_logger(impls[Api.telemetry])
|
setup_logger(impls[Api.telemetry])
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import yaml
|
||||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
from llama_stack.distribution.datatypes import * # noqa: F403
|
||||||
from llama_stack.distribution.configure import parse_and_maybe_upgrade_config
|
from llama_stack.distribution.configure import parse_and_maybe_upgrade_config
|
||||||
from llama_stack.distribution.request_headers import set_request_provider_data
|
from llama_stack.distribution.request_headers import set_request_provider_data
|
||||||
from llama_stack.distribution.resolver import resolve_impls_with_routing
|
from llama_stack.distribution.resolver import resolve_impls
|
||||||
|
|
||||||
|
|
||||||
async def resolve_impls_for_test(api: Api, deps: List[Api] = None):
|
async def resolve_impls_for_test(api: Api, deps: List[Api] = None):
|
||||||
|
@ -36,7 +36,7 @@ async def resolve_impls_for_test(api: Api, deps: List[Api] = None):
|
||||||
providers=chosen,
|
providers=chosen,
|
||||||
)
|
)
|
||||||
run_config = parse_and_maybe_upgrade_config(run_config)
|
run_config = parse_and_maybe_upgrade_config(run_config)
|
||||||
impls = await resolve_impls_with_routing(run_config)
|
impls = await resolve_impls(run_config)
|
||||||
|
|
||||||
if "provider_data" in config_dict:
|
if "provider_data" in config_dict:
|
||||||
provider_id = chosen[api.value][0].provider_id
|
provider_id = chosen[api.value][0].provider_id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue