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

feat: support /v1/rerank router #1398

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nongmo677
Copy link
Contributor

close #1397

参考如下几个项目的rerank接口做适配

  1. Fast GPT 提供的bge-reranker-large等示例
    https://github.com/labring/FastGPT/blob/a0c1320d477fd00769983d8ddcbb2b2c2f8fd3c3/python/bge-rerank/bge-reranker-large/app.py#L69

  2. q2wxec
    https://github.com/q2wxec/lang2openai?tab=readme-ov-file#4%E6%8E%A5%E5%8F%A3%E4%B8%80%E8%A7%88

  3. api-for-open-llm
    https://github.com/xusenlinzy/api-for-open-llm/blob/e46e48056a02ffbd90e0dfe4bc2f803df1e7e4e1/tests/rerank.py#L14

  4. xinference
    https://github.com/xorbitsai/inference/blob/5d55c9c791680383157dab65e0071b8ceca0c138/xinference/client/restful/restful_client.py#L166

我已确认该 PR 已自测通过,相关截图如下:
oneapi 渠道设置

渠道1 基于Fast GPT 提供接口示例测试的bge模型
fast-bge

渠道2 xinference 使用bcg模型
xin

测试
bge-test测试
bge-test

bcg测试
bcg-test

oneapi路由通过
oneapi-rerank

@nongmo677
Copy link
Contributor Author

Fast GPT rerank接入测试通过

配置
image

重排结果
image

@songquanpeng
Copy link
Owner

ack

@zhanghx0905
Copy link

考虑支持Text embedding inference吗

@nongmo677
Copy link
Contributor Author

考虑支持Text embedding inference吗

暂时还没有,等这个过了后面再添加

@songquanpeng
Copy link
Owner

songquanpeng commented May 20, 2024

不好意思我前段时间比较忙搁置了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support /v1/rerank route and model
3 participants