Skip to content

[Feature]: 支持第三方rerank模型 #874

@ColderWANG

Description

@ColderWANG

Problem Statement

当前rerank只支持火山引擎的模型?希望支持第三方模型

Proposed Solution

希望支持第三方模型,例如siliconflow里的rerank模型

Alternatives Considered

No response

Feature Area

Model Integration

Use Case

接入第三方rerank模型

Example API (Optional)

import requests

url = "https://api.siliconflow.cn/v1/rerank"

payload = {
    "model": "BAAI/bge-reranker-v2-m3",
    "query": "Apple",
    "documents": ["apple", "banana", "fruit", "vegetable"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Additional Context

No response

Contribution

  • I am willing to contribute to implementing this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions