langserve
langserve copied to clipboard
No playground message for paths added with ApiRouter
If routes are added with ApiRouter:
# some/folder/custom.py
from fastapi import APIRouter
router = APIRouter()
# Create some chain
chain = ...
add_routes(router, chain, ...)
# server.py
from some.folder.custom import router
app = FastAPI()
app.include_router(router)
then the build output won't print playground routes and the cool LANGSERVE ascii logo.
Routes added with ApiRouter should have playground link described as well.
Adding ApiRouters is a good practice in bigger FastApi projects.