yangdx
commited on
Commit
·
a853641
1
Parent(s):
1fbc1f7
Added root redirect to /webui and updated webui config
Browse files
lightrag/api/lightrag_server.py
CHANGED
@@ -10,6 +10,7 @@ import logging.config
|
|
10 |
import uvicorn
|
11 |
import pipmaster as pm
|
12 |
from fastapi.staticfiles import StaticFiles
|
|
|
13 |
from pathlib import Path
|
14 |
import configparser
|
15 |
from ascii_colors import ASCIIColors
|
@@ -340,6 +341,11 @@ def create_app(args):
|
|
340 |
# Add Ollama API routes
|
341 |
ollama_api = OllamaAPI(rag, top_k=args.top_k)
|
342 |
app.include_router(ollama_api.router, prefix="/api")
|
|
|
|
|
|
|
|
|
|
|
343 |
|
344 |
@app.get("/auth-status", dependencies=[Depends(optional_api_key)])
|
345 |
async def get_auth_status():
|
|
|
10 |
import uvicorn
|
11 |
import pipmaster as pm
|
12 |
from fastapi.staticfiles import StaticFiles
|
13 |
+
from fastapi.responses import RedirectResponse
|
14 |
from pathlib import Path
|
15 |
import configparser
|
16 |
from ascii_colors import ASCIIColors
|
|
|
341 |
# Add Ollama API routes
|
342 |
ollama_api = OllamaAPI(rag, top_k=args.top_k)
|
343 |
app.include_router(ollama_api.router, prefix="/api")
|
344 |
+
|
345 |
+
@app.get("/")
|
346 |
+
async def redirect_to_webui():
|
347 |
+
"""Redirect root path to /webui"""
|
348 |
+
return RedirectResponse(url="/webui")
|
349 |
|
350 |
@app.get("/auth-status", dependencies=[Depends(optional_api_key)])
|
351 |
async def get_auth_status():
|
lightrag/api/webui/assets/{index-DlSL6ZG8.js → index-CSrxfS-k.js}
RENAMED
Binary files a/lightrag/api/webui/assets/index-DlSL6ZG8.js and b/lightrag/api/webui/assets/index-CSrxfS-k.js differ
|
|
lightrag/api/webui/index.html
CHANGED
Binary files a/lightrag/api/webui/index.html and b/lightrag/api/webui/index.html differ
|
|
lightrag_webui/env.local.sample
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
VITE_BACKEND_URL=http://localhost:9621
|
2 |
VITE_API_PROXY=true
|
3 |
-
VITE_API_ENDPOINTS
|
|
|
1 |
VITE_BACKEND_URL=http://localhost:9621
|
2 |
VITE_API_PROXY=true
|
3 |
+
VITE_API_ENDPOINTS=/,/api,/documents,/graphs,/graph,/health,/query,/docs,/openapi.json,/login,/auth-status
|
lightrag_webui/src/lib/constants.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import { ButtonVariantType } from '@/components/ui/Button'
|
2 |
|
3 |
export const backendBaseUrl = ''
|
4 |
-
export const webuiPrefix = ''
|
5 |
|
6 |
export const controlButtonVariant: ButtonVariantType = 'ghost'
|
7 |
|
|
|
1 |
import { ButtonVariantType } from '@/components/ui/Button'
|
2 |
|
3 |
export const backendBaseUrl = ''
|
4 |
+
export const webuiPrefix = '/webui/'
|
5 |
|
6 |
export const controlButtonVariant: ButtonVariantType = 'ghost'
|
7 |
|