JesusMan0529 commented on code in PR #378:
URL: https://github.com/apache/hugegraph-ai/pull/378#discussion_r4192040496
##########
hugegraph-llm/src/hugegraph_llm/demo/rag_demo/configs_block.py:
##########
@@ -779,6 +795,31 @@ def vector_engine_settings(engine):
apply_faiss_button = gr.Button("Apply Configuration")
apply_faiss_button.click(lambda: apply_vector_engine(engine))
+ def refresh_llm_config(revision):
+ with runtime_config_lock:
+ llm_settings.__init__() # type: ignore[misc] # pylint:
disable=C2801
Review Comment:
Thanks for catching this! Fixed in e5c4cba. A failed reload now keeps the
current settings, shows a warning, and still renders all five provider forms
and their Apply buttons. Added regression tests for invalid provider/token/port
values and recovery after correcting the file; all 13 refresh tests pass.
##########
hugegraph-llm/src/hugegraph_llm/demo/rag_demo/configs_block.py:
##########
@@ -779,6 +795,31 @@ def vector_engine_settings(engine):
apply_faiss_button = gr.Button("Apply Configuration")
apply_faiss_button.click(lambda: apply_vector_engine(engine))
+ def refresh_llm_config(revision):
+ with runtime_config_lock:
+ llm_settings.__init__() # type: ignore[misc] # pylint:
disable=C2801
Review Comment:
Thanks! Fixed in e5c4cba. Reloads now read .env directly without copying its
values into os.environ, so deleted keys fall back to process settings or
defaults. Added regression tests for removing model, API key and provider
settings, including the environment fallback.
--
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]