Ensure the 'inputs' field in /chat-messages takes effect every time
Checklist:
[!IMPORTANT]
Please review the checklist below before submitting your pull request.
- [x] Please open an issue before creating a PR or link to an existing issue
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I ran
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods
Description
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. Close issue syntax: Fixes #<issue number>, see documentation for more details.
Close #7952 Close https://github.com/langgenius/dify/issues/7846 Close https://github.com/langgenius/dify/issues/8063 Close https://github.com/langgenius/dify/issues/8839 Close https://github.com/langgenius/dify/issues/8546 Close https://github.com/langgenius/dify/issues/10522 Close https://github.com/langgenius/dify/issues/10055 Close https://github.com/langgenius/dify/pull/10643
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update, included: Dify Document
- [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
- [ ] Dependency upgrade
Testing Instructions
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
This PR does not resolve, using the conversation id to link to previous sessions but the input works
This PR does not resolve, using the conversation id to link to previous sessions but the input works
I don't understand "using the conversation id to link to previous sessions but the input works". As for "This PR does not resolve", I have tried and I think it works.
This PR does not resolve, using the conversation id to link to previous sessions but the input works
This PR is to make sure the 'inputs' field in the API "/chat-messages" takes effect every time, is that what you mean "using the conversation id to link to previous sessions but the input works"?
Yes, you mean that the input field of the conversation can be updated under the same conversation, because the input is only effective when the conversation link is first established
Yes, you mean that the input field of the conversation can be updated under the same conversation, because the input is only effective when the conversation link is first established
@cubxxw
I noticed that both table 'messages' and table 'conversations' have an 'inputs' field. I think the 'inputs' field should be aligned with table 'messages'. The 'inputs' field in table 'conversations' may not be very useful.
In this PR, the 'inputs' field in table 'conversations' means the 'inputs' in the first message, and the 'inputs' field in table 'messages' means the true inputs in this message.
This PR does not resolve, using the conversation id to link to previous sessions but the input works
What's the mean of 'This PR does not resolve'? Is that any problems?
https://github.com/langgenius/dify/issues/8063
This is the problem I encountered,
maybe I understand wrong, this PR can't solve the problem of the video in issue?
I understand that the conversation table input is valid for the first time. The message table is used for every subsequent interaction, right?
#8063
This is the problem I encountered,
maybe I understand wrong, this PR can't solve the problem of the video in issue?
This PR can solve the problem of the video in issue. @cubxxw
https://github.com/user-attachments/assets/78f2b50a-1688-436f-b8dd-eb6153a5bb51
I understand that the conversation table input is valid for the first time. The message table is used for every subsequent interaction, right?
right
I think it's great, too
Hope to support this feature
Has this feature not been merged?
Has this feature not been merged?
I don't know why they don't merge it, maybe we need more people to push them.
Author
I highly appreciate your functionality and have submitted a new issue. If they do not merge, I will download your branch https://github.com/langgenius/dify/issues/10522 #10522
I have already talked to our team about this pr. :) We will evaluate this later.
I have opened a discussion here, please forward this to other community groups, we would like to gather some information regarding this feature.
https://github.com/langgenius/dify/discussions/10652
Hope to merge
I tried to merge your code in my project, but it didn't take effect. I modified the three lines of code in those three files and changed them to inputs=self_ Prepare_user_inputs (user_inputs=inputs, app_ config=app_ config), right?
I tried to merge your code in my project, but it didn't take effect. I modified the three lines of code in those three files and changed them to inputs=self_ Prepare_user_inputs (user_inputs=inputs, app_ config=app_ config), right?
right
I tried to merge your code in my project, but it didn't take effect. I modified the three lines of code in those three files and changed them to inputs=self_ Prepare_user_inputs (user_inputs=inputs, app_ config=app_ config), right?
right
It seems to have failed? My DIY version is 0.11.0
https://github.com/user-attachments/assets/12839e0c-9c66-443c-8737-fba1158b631e
I tried to merge your code in my project, but it didn't take effect. I modified the three lines of code in those three files and changed them to inputs=self_ Prepare_user_inputs (user_inputs=inputs, app_ config=app_ config), right?
right
It seems to have failed? My DIY version is 0.11.0
It works well in 0.8.0. I will try 0.11.0 if I have time
It seems to have failed? My DIY version is 0.11.0
@liuzixiao666 I merged the 'langgenius:main' branch into my branch and tested it on v0.11.1. It works well.
https://github.com/user-attachments/assets/6ea79025-14e8-420e-aec6-27b1a1aac9bf
It seems to have failed? My DIY version is 0.11.0似乎失败了?我的DIY版本是0.11.0
@liuzixiao666 I merged the 'langgenius:main' branch into my branch and tested it on v0.11.1. It works well.我将"langgenius:main“分支合并到我的分支中,并在v0.11.1上进行了测试。很好用。
2024-11-15.17-36-33.mp4
i will have a try again
It seems to have failed? My DIY version is 0.11.0
@liuzixiao666 I merged the 'langgenius:main' branch into my branch and tested it on v0.11.1. It works well.
2024-11-15.17-36-33.mp4
Mine still hasn't taken effect. Is it because I started Docker? Are you starting from local source code
It seems to have failed? My DIY version is 0.11.0
@liuzixiao666 I merged the 'langgenius:main' branch into my branch and tested it on v0.11.1. It works well. 2024-11-15.17-36-33.mp4
Mine still hasn't taken effect. Is it because I started Docker? Are you starting from local source code
I built Docker from local source code and run docker run -d -e MODE=api --restart=unless-stopped --name "dify-api" --network host --env-file .env dify-api
It seems to have failed? My DIY version is 0.11.0
@liuzixiao666 I merged the 'langgenius:main' branch into my branch and tested it on v0.11.1. It works well. 2024-11-15.17-36-33.mp4
Mine still hasn't taken effect. Is it because I started Docker? Are you starting from local source code
I built Docker from local source code and run
docker run -d -e MODE=api --restart=unless-stopped --name "dify-api" --network host --env-file .env dify-api
I can't quite understand your code, it seems like you have rebuilt a new Docker container. Does that mean that stopping the container and using 'docker compose up - d' will not work when I run it in the Docker directory? Do you know how to make the modified code take effect
@liuzixiao666
I have read the default docker-compose.yaml and It seems not from local source code:
If you want to use docker, you need to make sure the docker you use is built locally, or waiting for merging this PR. ^_^
What a great PR! This will solve a lot of problems! Looking forward to merging
What a great PR! This will solve a lot of problems! Looking forward to merging
Remember to give a like here #10652