feat: main
This commit is contained in:
@@ -1,19 +1,12 @@
|
|||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
from fastapi.responses import RedirectResponse
|
from fastapi.responses import RedirectResponse
|
||||||
from langserve import add_routes
|
from langserve import add_routes
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
async def redirect_root_to_docs() -> RedirectResponse:
|
async def redirect_root_to_docs() -> RedirectResponse:
|
||||||
return RedirectResponse("/docs")
|
return RedirectResponse("/docs")
|
||||||
|
|
||||||
|
|
||||||
# Edit this to add the chain you want to add
|
# Edit this to add the chain you want to add
|
||||||
add_routes(app, NotImplemented)
|
# add_routes(app, NotImplemented)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
uvicorn.run(app, host="localhost", port=8000)
|
||||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
|
||||||
Reference in New Issue
Block a user