Deploy: LangServer

This commit is contained in:
2024-10-30 15:08:55 -05:00
parent 4b58bdae37
commit a5e9f2db81
8 changed files with 161 additions and 2 deletions

0
app/__init__.py Normal file
View File

19
app/server.py Normal file
View File

@@ -0,0 +1,19 @@
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)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)