imbajin commented on code in PR #419:
URL: https://github.com/apache/hugegraph-ai/pull/419#discussion_r4577603640


##########
hugegraph-llm/src/hugegraph_llm/demo/rag_demo/app.py:
##########
@@ -142,6 +123,8 @@ def refresh_ui_config_prompt() -> tuple:
                     huge_settings.graph_name,
                     prompt.gremlin_generate_prompt,
                 )
+                refresh_settings_snapshot()

Review Comment:
   **⚠️ Refresh the language before loading prompts**
   
   If `LANGUAGE` is changed in the persisted configuration while the app is 
running and the load handler runs before the render callbacks, 
`prompt.ensure_yaml_file_exists()` still reads the old `llm_settings.language`; 
this call then reloads the new language after the prompt values have already 
been selected. The page and shared prompt object can consequently retain 
English prompts while the runtime language is Chinese (or vice versa), until 
another prompt reload. Please refresh the settings before resolving prompts and 
also keep prompts synchronized when a form render reloads a changed language.



-- 
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