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 xinference add rerank model bug #2758

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

wangguo1230
Copy link
Contributor

What problem does this PR solve?

Fix xinference add rerank model bug, #2294 (comment)

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@KevinHuSh KevinHuSh added the ci Continue Integration label Oct 9, 2024
@@ -154,8 +156,8 @@ def similarity(self, query: str, texts: list):

class XInferenceRerank(Base):
def __init__(self, key="xxxxxxx", model_name="", base_url=""):
if base_url.split("/")[-1] != "v1":
Copy link

@Halfknow Halfknow Oct 9, 2024

Choose a reason for hiding this comment

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

I recommand the code changed as follows to fix xinference rerank model add failure:
if base_url.split("/")[-1] != "v1" and base_url.split("/")[-1] != "rerank":

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case, the end is / easy to have problems, so I used find

@KevinHuSh KevinHuSh merged commit 2df1574 into infiniflow:main Oct 9, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continue Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants