forked from open-webui/open-webui
feat: rag api endpoint
This commit is contained in:
parent
7071716f54
commit
b2c9f6dff8
3 changed files with 33 additions and 4 deletions
23
backend/apps/rag/main.py
Normal file
23
backend/apps/rag/main.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
from fastapi import FastAPI, Request, Depends, HTTPException
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from apps.web.routers import auths, users, chats, modelfiles, utils
|
||||
from config import WEBUI_VERSION, WEBUI_AUTH
|
||||
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
origins = ["*"]
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def get_status():
|
||||
return {"status": True}
|
Loading…
Add table
Add a link
Reference in a new issue