langserve icon indicating copy to clipboard operation
langserve copied to clipboard

No playground message for paths added with ApiRouter

Open lukasugar opened this issue 1 year ago • 0 comments

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.

lukasugar avatar Jun 10 '24 12:06 lukasugar