mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
chore: mv router_registry.py to fastapi_router_registry.py
For clarity Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
23e74446db
commit
8a21d8debe
6 changed files with 5 additions and 5 deletions
|
|
@ -77,7 +77,7 @@ def create_llama_stack_app() -> FastAPI:
|
||||||
)
|
)
|
||||||
|
|
||||||
# Include routers for APIs that have them (automatic discovery)
|
# Include routers for APIs that have them (automatic discovery)
|
||||||
from llama_stack.core.server.router_registry import build_router, has_router
|
from llama_stack.core.server.fastapi_router_registry import build_router, has_router
|
||||||
|
|
||||||
def dummy_impl_getter(api: Api) -> Any:
|
def dummy_impl_getter(api: Api) -> Any:
|
||||||
"""Dummy implementation getter for OpenAPI generation."""
|
"""Dummy implementation getter for OpenAPI generation."""
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ from pydantic import BaseModel
|
||||||
|
|
||||||
from llama_stack.core.datatypes import StackRunConfig
|
from llama_stack.core.datatypes import StackRunConfig
|
||||||
from llama_stack.core.external import load_external_apis
|
from llama_stack.core.external import load_external_apis
|
||||||
from llama_stack.core.server.router_registry import build_router, has_router
|
from llama_stack.core.server.fastapi_router_registry import build_router, has_router
|
||||||
from llama_stack.core.server.routes import get_all_api_routes
|
from llama_stack.core.server.routes import get_all_api_routes
|
||||||
from llama_stack_api import (
|
from llama_stack_api import (
|
||||||
Api,
|
Api,
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ def get_all_api_routes(
|
||||||
|
|
||||||
This function only returns routes from APIs that use the legacy @webmethod
|
This function only returns routes from APIs that use the legacy @webmethod
|
||||||
decorator system. For APIs that have been migrated to FastAPI routers,
|
decorator system. For APIs that have been migrated to FastAPI routers,
|
||||||
use the router registry (router_registry.has_router() and router_registry.build_router()).
|
use the router registry (fastapi_router_registry.has_router() and fastapi_router_registry.build_router()).
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
external_apis: Optional dictionary of external API specifications
|
external_apis: Optional dictionary of external API specifications
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ from llama_stack.core.request_headers import (
|
||||||
request_provider_data_context,
|
request_provider_data_context,
|
||||||
user_from_scope,
|
user_from_scope,
|
||||||
)
|
)
|
||||||
from llama_stack.core.server.router_registry import build_router
|
from llama_stack.core.server.fastapi_router_registry import build_router
|
||||||
from llama_stack.core.server.routes import get_all_api_routes
|
from llama_stack.core.server.routes import get_all_api_routes
|
||||||
from llama_stack.core.stack import (
|
from llama_stack.core.stack import (
|
||||||
Stack,
|
Stack,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
from aiohttp import hdrs
|
from aiohttp import hdrs
|
||||||
|
|
||||||
from llama_stack.core.external import ExternalApiSpec
|
from llama_stack.core.external import ExternalApiSpec
|
||||||
from llama_stack.core.server.router_registry import has_router
|
from llama_stack.core.server.fastapi_router_registry import has_router
|
||||||
from llama_stack.core.server.routes import find_matching_route, initialize_route_impls
|
from llama_stack.core.server.routes import find_matching_route, initialize_route_impls
|
||||||
from llama_stack.core.telemetry.tracing import end_trace, start_trace
|
from llama_stack.core.telemetry.tracing import end_trace, start_trace
|
||||||
from llama_stack.log import get_logger
|
from llama_stack.log import get_logger
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue