mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-18 14:39:48 +00:00
add tools api with a stub provider impl
This commit is contained in:
parent
e65a6fac9d
commit
e5ac10f803
14 changed files with 172 additions and 37 deletions
|
|
@ -17,6 +17,7 @@ from .routing_tables import (
|
|||
ModelsRoutingTable,
|
||||
ScoringFunctionsRoutingTable,
|
||||
ShieldsRoutingTable,
|
||||
ToolsRoutingTable,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -33,6 +34,7 @@ async def get_routing_table_impl(
|
|||
"datasets": DatasetsRoutingTable,
|
||||
"scoring_functions": ScoringFunctionsRoutingTable,
|
||||
"eval_tasks": EvalTasksRoutingTable,
|
||||
"tools": ToolsRoutingTable,
|
||||
}
|
||||
|
||||
if api.value not in api_to_tables:
|
||||
|
|
@ -51,6 +53,7 @@ async def get_auto_router_impl(api: Api, routing_table: RoutingTable, _deps) ->
|
|||
MemoryRouter,
|
||||
SafetyRouter,
|
||||
ScoringRouter,
|
||||
ToolRuntimeRouter,
|
||||
)
|
||||
|
||||
api_to_routers = {
|
||||
|
|
@ -60,6 +63,7 @@ async def get_auto_router_impl(api: Api, routing_table: RoutingTable, _deps) ->
|
|||
"datasetio": DatasetIORouter,
|
||||
"scoring": ScoringRouter,
|
||||
"eval": EvalRouter,
|
||||
"tool_runtime": ToolRuntimeRouter,
|
||||
}
|
||||
if api.value not in api_to_routers:
|
||||
raise ValueError(f"API {api.value} not found in router map")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue