From 46ac5dac5325255dea7a93687a4d23d211c21ec0 Mon Sep 17 00:00:00 2001 From: yangdx Date: Fri, 17 Oct 2025 16:24:01 +0800 Subject: [PATCH] Improve API description formatting and add ReDoc link --- lightrag/api/lightrag_server.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index a558dae3..383c5ef3 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -345,14 +345,17 @@ def create_app(args): finalize_share_data() # Initialize FastAPI + base_description = ( + "Providing API for LightRAG core, Web UI and Ollama Model Emulation" + ) + swagger_description = ( + base_description + + (" (With authentication)" if api_key else "") + + "\n\n[View ReDoc documentation](/redoc)" + ) app_kwargs = { "title": "LightRAG Server API", - "description": ( - "Providing API for LightRAG core, Web UI and Ollama Model Emulation" - + "(With authentication)" - if api_key - else "" - ), + "description": swagger_description, "version": __api_version__, "openapi_url": "/openapi.json", # Explicitly set OpenAPI schema URL "docs_url": "/docs", # Explicitly set docs URL