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

community: Fix rank-llm import paths for new 0.20.3 version #29154

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

tymzar
Copy link
Contributor

@tymzar tymzar commented Jan 11, 2025

PR title: "community: Fix rank-llm import paths for new 0.20.3 version"

  • The "community" package is being modified to handle updated import paths for the new rank-llm version.

Description

This PR updates the import paths for the rank-llm package to account for changes introduced in version 0.20.3. The changes ensure compatibility with both pre- and post-revamp versions of rank-llm, specifically version 0.12.8. Conditional imports are introduced based on the detected version of rank-llm to handle different path structures for VicunaReranker, ZephyrReranker, and SafeOpenai.

Issue

RankLLMRerank usage throws an error when used GPT (not only) when rank-llm version is > 0.12.8 - #29156

Dependencies

This change relies on the packaging and pkg_resources libraries to handle version checks.

Twitter handle

@tymzar

Copy link

vercel bot commented Jan 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 11:30pm

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. community Related to langchain-community labels Jan 11, 2025
Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

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

Thanks for maintaining backward compatibility!

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jan 13, 2025
@ccurme ccurme merged commit 689592f into langchain-ai:master Jan 13, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community lgtm PR looks good. Use to confirm that a PR is ready for merging. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants