fix: rerank endpoint base url
This commit is contained in:
@@ -1304,14 +1304,7 @@ func (h *InitializationHandler) checkRerankModelConnection(ctx context.Context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 构造重排API端点
|
// 构造重排API端点
|
||||||
rerankEndpoint := ""
|
rerankEndpoint := baseURL + "/rerank"
|
||||||
if strings.Contains(baseURL, "v1") {
|
|
||||||
// 去除v1
|
|
||||||
baseURL = strings.Replace(baseURL, "/v1", "", 1)
|
|
||||||
rerankEndpoint = baseURL + "/rerank"
|
|
||||||
} else {
|
|
||||||
rerankEndpoint = baseURL + "/rerank"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mock测试数据
|
// Mock测试数据
|
||||||
testQuery := "什么是人工智能?"
|
testQuery := "什么是人工智能?"
|
||||||
|
|||||||
Reference in New Issue
Block a user