-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
fix: remove the latest message from the user that does not have any answer yet #9297
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dosubot
bot
added
size:XS
This PR changes 0-9 lines, ignoring generated files.
🐞 bug
Something isn't working
labels
Oct 13, 2024
@xuzuodong |
Hi, sorry for causing this. 😥 I can reproduce this and confirm that this PR is the correct way to fix #9041. And my understanding for the reason why only Gemini is responding error is because Gemini doesn't allow empty content on any past messages. Is that correct? |
crazywoola
approved these changes
Oct 13, 2024
5 tasks
ZhouhaoJiang
added a commit
that referenced
this pull request
Oct 14, 2024
* main: (121 commits) fix: remove the latest message from the user that does not have any answer yet (#9297) Add Volcengine VikingDB as new vector provider (#9287) chore: translate i18n files (#9288) chore: add baidu-obs and supabase for .env.example (#9289) chore: add abstract decorator and output log when query embedding fails (#9264) Feat/new account page (#9236) Feat/implement-refresh-tokens (#9233) feat: refresh-token (#9286) chore: translate i18n files (#9284) feat:support baidu vector db (#9185) Feat: rerank model verification in front end (#9271) Fix/s3 iam add region name (#7819) chore: optimize the trace ops slow queries on node executions. (#9282) chore: use cache instead of re-querying node record during workflow execution (#9280) chore: fix the misclassification of the opensearch-py package (#9266) fix: add new domain to whitelist (#9265) fix: move exception to debug mode (#9258) feat: add supabase object storage (#9229) fix: dialog box cannot correctly display LaTeX formulas (#9242) Fix/agent external knowledge retrieval (#9241) ...
Scorpion1221
added a commit
to yybht155/dify
that referenced
this pull request
Oct 21, 2024
* commit '5c7b1358d49c8df54bc39eea7b9c4d9b41c09fcb': (235 commits) chore(release): bump version to 0.9.2 (langgenius#9314) fix: token refreshing logic issue (langgenius#9308) fix: Add new Milvus Lite wheel for manylinux2014_aarch64 (langgenius#9316) chore: add reopen preview btn (langgenius#9279) chore: Optimize operations in Q&A mode (langgenius#9274) refactor: Refactor the service of retrieval the recommend app (langgenius#9302) chore: remove the copied zhipu_ai sdk (langgenius#9270) fix: remove the latest message from the user that does not have any answer yet (langgenius#9297) Add Volcengine VikingDB as new vector provider (langgenius#9287) chore: translate i18n files (langgenius#9288) chore: add baidu-obs and supabase for .env.example (langgenius#9289) chore: add abstract decorator and output log when query embedding fails (langgenius#9264) Feat/new account page (langgenius#9236) Feat/implement-refresh-tokens (langgenius#9233) feat: refresh-token (langgenius#9286) chore: translate i18n files (langgenius#9284) feat:support baidu vector db (langgenius#9185) Feat: rerank model verification in front end (langgenius#9271) Fix/s3 iam add region name (langgenius#7819) chore: optimize the trace ops slow queries on node executions. (langgenius#9282) ... # Conflicts: # web/package.json # web/yarn.lock
lau-td
pushed a commit
to heydevs-io/dify
that referenced
this pull request
Oct 23, 2024
idonotknow
pushed a commit
to AceDataCloud/Dify
that referenced
this pull request
Nov 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist:
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsDescription
To resolve issue #9041, #9122 was merged, but #9122 is not functioning as expected.
#9122 is attempting to remove only the user's latest message (one that has not yet received a answer) using
pop()
.https://github.com/langgenius/dify/pull/9122/files#diff-32253f22ce6d4d0b26560678c8de9dc9fe3d1b11bc4f912b008152c8ed9b4380R63-R64
However, the latest message in
thread_messages
is at the beginning ([0]
), not at the end ([-1]
). Therefore, to check for an answer andpop()
, it should be for the beginning ([0]
), not for the end ([-1]
).Fixes #9296
Type of Change
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
Context
Chat
,agent
andChatflow
app #7661