IMPROVEMENT redirect root to docs in langserve app template (#13303)

pull/13314/head
Erick Friis 7 months ago committed by GitHub
parent a591cdb67d
commit 280ecfd8eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,15 @@
from fastapi import FastAPI
from fastapi.responses import RedirectResponse
from langserve import add_routes
app = FastAPI()
@app.get("/")
async def redirect_root_to_docs():
return RedirectResponse("/docs")
# Edit this to add the chain you want to add
add_routes(app, NotImplemented)

Loading…
Cancel
Save