mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 18:00:36 +00:00
chore: rename routes.py to fastapi_routes.py
Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
f62c6044b3
commit
23e74446db
3 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ def has_router(api: "Api") -> bool:
|
|||
True if the API has a routes module with a create_router function
|
||||
"""
|
||||
try:
|
||||
routes_module = importlib.import_module(f"llama_stack_api.{api.value}.routes")
|
||||
routes_module = importlib.import_module(f"llama_stack_api.{api.value}.fastapi_routes")
|
||||
return hasattr(routes_module, "create_router")
|
||||
except (ImportError, AttributeError):
|
||||
return False
|
||||
|
|
@ -50,7 +50,7 @@ def build_router(api: "Api", impl_getter: Callable[["Api"], Any]) -> APIRouter |
|
|||
APIRouter if the API has a routes module with create_router, None otherwise
|
||||
"""
|
||||
try:
|
||||
routes_module = importlib.import_module(f"llama_stack_api.{api.value}.routes")
|
||||
routes_module = importlib.import_module(f"llama_stack_api.{api.value}.fastapi_routes")
|
||||
if hasattr(routes_module, "create_router"):
|
||||
router_factory = routes_module.create_router
|
||||
return router_factory(impl_getter)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
This module contains the Batches protocol definition.
|
||||
Pydantic models are defined in llama_stack_api.batches.models.
|
||||
The FastAPI router is defined in llama_stack_api.batches.routes.
|
||||
The FastAPI router is defined in llama_stack_api.batches.fastapi_routes.
|
||||
"""
|
||||
|
||||
from typing import Protocol, runtime_checkable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue