mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-07 20:50:52 +00:00
Basic build and run succeeded
This commit is contained in:
parent
4d5ca49eed
commit
2ed65a47a4
9 changed files with 50 additions and 42 deletions
|
@ -4,7 +4,7 @@
|
|||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
from typing import Any, Dict, List, Tuple
|
||||
from typing import Any, List, Tuple
|
||||
|
||||
from llama_stack.distribution.datatypes import * # noqa: F403
|
||||
|
||||
|
@ -14,7 +14,7 @@ async def get_routing_table_impl(
|
|||
inner_impls: List[Tuple[str, Any]],
|
||||
routing_table_config: RoutingTableConfig,
|
||||
_deps,
|
||||
) -> Dict[str, List[ProviderRoutingEntry]]:
|
||||
) -> Any:
|
||||
from .routing_tables import (
|
||||
MemoryBanksRoutingTable,
|
||||
ModelsRoutingTable,
|
||||
|
@ -22,9 +22,9 @@ async def get_routing_table_impl(
|
|||
)
|
||||
|
||||
api_to_tables = {
|
||||
"memory": MemoryBanksRoutingTable,
|
||||
"inference": ModelsRoutingTable,
|
||||
"safety": ShieldsRoutingTable,
|
||||
"memory_banks": MemoryBanksRoutingTable,
|
||||
"models": ModelsRoutingTable,
|
||||
"shields": ShieldsRoutingTable,
|
||||
}
|
||||
if api.value not in api_to_tables:
|
||||
raise ValueError(f"API {api.value} not found in router map")
|
||||
|
@ -37,7 +37,6 @@ async def get_routing_table_impl(
|
|||
async def get_auto_router_impl(api: Api, routing_table: RoutingTable, _deps) -> Any:
|
||||
from .routers import InferenceRouter, MemoryRouter, SafetyRouter
|
||||
|
||||
# TODO: make this completely dynamic
|
||||
api_to_routers = {
|
||||
"memory": MemoryRouter,
|
||||
"inference": InferenceRouter,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue