Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] In rag_web_demo. Unable to get the latest Settings of the configuration file after ui refresh #91

Open
1 task done
returnToInnocence opened this issue Oct 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@returnToInnocence
Copy link
Contributor

returnToInnocence commented Oct 9, 2024

Bug Type (问题类型)

rest-api (结果不合预期)

Before submit

  • I had searched in the issues and found no similar issues.

Environment (环境信息)

  • hugegraph_llm.demo.rag_demo.app

Expected & Actual behavior (期望与实际表现)

After the process is started (the process is still running), you can refresh the ui after modifying the information in the configuration file locally to display the locally updated parameter information in the configuration file

Solve the problem-PR

@returnToInnocence returnToInnocence added the bug Something isn't working label Oct 9, 2024
Copy link

dosubot bot commented Oct 9, 2024

To ensure the latest settings of the configuration file are reflected in the UI after a refresh in hugegraph_llm.demo.rag_demo.app, you should use the apply_*_config functions. These functions update the settings and call settings.update_env() to apply the changes.

For example, when you click the "apply configuration" button for embeddings, it triggers the apply_embedding_config function, which updates the settings and calls settings.update_env(). This ensures that the latest settings are applied and reflected in the UI.

Make sure to call the appropriate apply_*_config function for each configuration section to update the settings and reflect them in the UI [1].

To continue talking to Dosu, mention @dosu.

imbajin added a commit that referenced this issue Oct 15, 2024
## Brief description
1. Fixed an issue where rag web demo could not update system configuration in time after configuration file changes in file `hugegraph-llm/src/hugegraph_llm/demo/rag_demo/app.py`
	- graph config, the picture is as follows
![image](https://github.com/user-attachments/assets/64e012f4-01e6-4f8f-af43-b79b80cf96b1)
	- prompt, the picture is as follows
![image](https://github.com/user-attachments/assets/a6ac0610-fa50-48d2-9990-4987d8d26cfd)
	- rag with hugegraph, as follows
![image](https://github.com/user-attachments/assets/fefe5a65-99f7-46d0-a7da-3aaa914bb521)


To avoid errors that result in an empty return value in file `hugegraph-llm/src/hugegraph_llm/demo/rag_demo/configs_block.py`

2. Adjust the order of functions and classes in file `hugegraph-llm/src/hugegraph_llm/config/config.py`

3. Adjust the format of the prompt to make it easier to read in file `hugegraph-llm/src/hugegraph_llm/config/config_data.py`

4. Add the ability to save prompt to the configuration file after a button click to the kg build section in file `hugegraph-llm/src/hugegraph_llm/demo/rag_demo/vector_graph_block.py`, the position as follows
![image](https://github.com/user-attachments/assets/fb819c13-55c9-4c67-942e-e7ac57509f8f)


## issue
fix some of the #91 

---------

Co-authored-by: imbajin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant