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

fix: reranking_enable setting failed #13668 #13721

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

le0zh
Copy link
Contributor

@le0zh le0zh commented Feb 14, 2025

Summary

Fixes #13668

We encountered the same issue as #13668. After reviewing the code, we found that

ignores the user-configured value and always sets it to true by default.

Screenshots

Before After
... ...

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code. 🐞 bug Something isn't working labels Feb 14, 2025
@le0zh le0zh force-pushed the fix-rerank-setting branch from 5df4ebc to b3113e2 Compare February 14, 2025 04:31
@crazywoola crazywoola requested a review from WTW0313 February 14, 2025 05:37
Copy link
Collaborator

@WTW0313 WTW0313 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@le0zh Thank you for your fix. This morning, I reviewed my code and found the same issue. In fact, when the user doesn't set a reranking model and the default reranking model is valid, the default model will be set and the switch will be turned on. I think deleting line 170 to 172 should solve the problem.

@le0zh
Copy link
Contributor Author

le0zh commented Feb 14, 2025

@WTW0313 Thank you for explaining the logic behind it. I have made the changes according to your suggestion.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 14, 2025
@crazywoola crazywoola merged commit 1f63028 into langgenius:main Feb 14, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

can't close rerank model used
3 participants