returnToInnocence commented on code in PR #114:
URL: 
https://github.com/apache/incubator-hugegraph-ai/pull/114#discussion_r1844955497


##########
hugegraph-llm/src/hugegraph_llm/demo/rag_demo/app.py:
##########
@@ -132,19 +132,27 @@ def refresh_ui_config_prompt() -> tuple:
     parser.add_argument("--port", type=int, default=8001, help="port")
     args = parser.parse_args()
     app = FastAPI()
-    api_auth = APIRouter(dependencies=[Depends(authenticate)])
     
     settings.check_env()
     prompt.update_yaml_file()
 
+    auth_enabled = os.getenv("ENABLE_LOGIN", "False").lower() == "true"
+    log.info("(Status) Authentication is %s now.", "enabled" if auth_enabled 
else "disabled")
+
+    if auth_enabled == False:
+        api_auth = APIRouter()
+    else:
+        api_auth = APIRouter(dependencies=[Depends(authenticate)])

Review Comment:
   The test results are as expected!🫡



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to