Basic build and run succeeded

This commit is contained in:
Ashwin Bharambe 2024-09-22 16:30:32 -07:00
parent 4d5ca49eed
commit 2ed65a47a4
9 changed files with 50 additions and 42 deletions

View file

@ -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,