mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-21 13:42:26 +00:00
feat: migrate Providers API to FastAPI router pattern (#4405)
# What does this PR do? Convert Providers API from @webmethod decorators to FastAPI router pattern. Fixes: https://github.com/llamastack/llama-stack/issues/4350 <!-- Provide a short summary of what this PR does and why. Link to relevant issues if applicable. --> <!-- If resolving an issue, uncomment and update the line below --> <!-- Closes #[issue-number] --> ## Test Plan CI Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
722d9c53e7
commit
cd5095a247
13 changed files with 287 additions and 121 deletions
|
|
@ -17,7 +17,7 @@ from fastapi import APIRouter
|
|||
from fastapi.routing import APIRoute
|
||||
from starlette.routing import Route
|
||||
|
||||
from llama_stack_api import batches, benchmarks, datasets
|
||||
from llama_stack_api import batches, benchmarks, datasets, providers
|
||||
|
||||
# Router factories for APIs that have FastAPI routers
|
||||
# Add new APIs here as they are migrated to the router system
|
||||
|
|
@ -27,6 +27,7 @@ _ROUTER_FACTORIES: dict[str, Callable[[Any], APIRouter]] = {
|
|||
"batches": batches.fastapi_routes.create_router,
|
||||
"benchmarks": benchmarks.fastapi_routes.create_router,
|
||||
"datasets": datasets.fastapi_routes.create_router,
|
||||
"providers": providers.fastapi_routes.create_router,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue